home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1998 November / Freeware November 1998.img / dist / fw_gnuplot.idb / usr / freeware / doc / gnuplot / gnuplot.ms.z / gnuplot.ms
Text File  |  1998-05-21  |  277KB  |  9,760 lines

  1. .if n \{.nr LL +8m
  2. .na \}
  3. .nr PO +0.3i
  4. .so titlepag.ms
  5. .pn 1
  6. .bp
  7. .ta 1.5i 3.0i 4.5i 6.0i 7.5i
  8. \&
  9. .sp 3
  10. .PP
  11. .sp 3
  12. .NH 1
  13. Gnuplot
  14. .sp 1
  15. .LP
  16. .XS
  17. Gnuplot
  18. .XE
  19. .sp 2
  20. .NH 1
  21. Copyright
  22. .sp 1
  23. .LP
  24. .XS
  25. Copyright
  26. .XE
  27. .br
  28.       Copyright (C) 1986 - 1993, 1997   Thomas Williams, Colin Kelley
  29. .br
  30.  
  31. Permission to use, copy, and distribute this software and its documentation
  32. for any purpose with or without fee is hereby granted, provided that the
  33. above copyright notice appears in all copies and that both that copyright
  34. notice and this permission notice appear in supporting documentation.
  35.  
  36. Permission to modify the software is granted, but not the right to distribute
  37. the modified code.  Modifications are to be distributed as patches to the
  38. released version.
  39.  
  40. This software is provided "as is" without express or implied warranty.
  41.  
  42.  
  43. .br
  44.       AUTHORS
  45. .br
  46.  
  47. .br
  48.       Original Software:
  49. .br
  50. .br
  51.          Thomas Williams,  Colin Kelley.
  52. .br
  53.  
  54. .br
  55.       Gnuplot 2.0 additions:
  56. .br
  57. .br
  58.          Russell Lang, Dave Kotz, John Campbell.
  59. .br
  60.  
  61. .br
  62.       Gnuplot 3.0 additions:
  63. .br
  64. .br
  65.          Gershon Elber and many others.
  66. .br
  67. .sp 2
  68. .NH 1
  69. Introduction
  70. .sp 1
  71. .LP
  72. .XS
  73. Introduction
  74. .XE
  75. \fBgnuplot\fR is a command-driven interactive function and data plotting program.
  76. It is case sensitive (commands and function names written in lowercase are
  77. not the same as those written in CAPS).  All command names may be abbreviated
  78. as long as the abbreviation is not ambiguous.  Any number of commands may
  79. appear on a line (with the exception that \fBload\fR or \fBcall\fR must be the final
  80. command), separated by semicolons (;).  Strings are indicated with quotes.
  81. They may be either single or double quotation marks, e.g.,
  82.  
  83. .br
  84.       load "filename"
  85. .br
  86. .br
  87.       cd 'dir'
  88. .br
  89.  
  90. although there are some subtle differences (see \fBsyntax\fR for more details).
  91.  
  92. Any command-line arguments are assumed to be names of files containing
  93. \fBgnuplot\fR commands, with the exception of standard X11 arguments, which are
  94. processed first.  Each file is loaded with the \fBload\fR command, in the order
  95. specified.  \fBgnuplot\fR exits after the last file is processed.  When no load
  96. files are named, \fBgnuplot\fR enters into an interactive mode.
  97.  
  98. Many \fBgnuplot\fR commands have multiple options.  These options must appear in
  99. the proper order, although unwanted ones may be omitted in most cases.  Thus
  100. if the entire command is "command a b c", then "command a c" will probably
  101. work, but "command c a" will fail.
  102.  
  103. Commands may extend over several input lines by ending each line but the last
  104. with a backslash (\\).  The backslash must be the _last_ character on each
  105. line.  The effect is as if the backslash and newline were not there.  That
  106. is, no white space is implied, nor is a comment terminated.  Therefore,
  107. commenting out a continued line comments out the entire command (see
  108. \fBcomment\fR).  But note that if an error occurs somewhere on a multi-line
  109. command, the parser may not be able to locate precisely where the error is
  110. and in that case will not necessarily point to the correct line.
  111.  
  112. In this document, curly braces ({}) denote optional arguments and a vertical
  113. bar (|) separates mutually exclusive choices.  \fBgnuplot\fR keywords or \fBhelp\fR
  114. topics are indicated by backquotes or \fBboldface\fR (where available).  Angle
  115. brackets (<>) are used to mark replaceable tokens.
  116.  
  117. For on-line help on any topic, type \fBhelp\fR followed by the name of the topic
  118. or just \fBhelp\fR or \fB?\fR to get a menu of available topics.
  119.  
  120. The new \fBgnuplot\fR user should begin by reading about the \fBplot\fR command (if
  121. on-line, type \fBhelp plot\fR).
  122. .sp 2
  123. .NH 1
  124. Seeking-assistance
  125. .sp 1
  126. .LP
  127. .XS
  128. Seeking-assistance
  129. .XE
  130. There is a mailing list for \fBgnuplot\fR users.  Note, however, that the
  131. newsgroup
  132. .br
  133.       comp.graphics.apps.gnuplot
  134. .br
  135. is identical to the mailing list (they both carry the same set of messages).
  136. We prefer that you read the messages through the newsgroup rather than
  137. subscribing to the mailing list.  Administrative requests should be sent to
  138. .br
  139.       majordomo@dartmouth.edu
  140. .br
  141. Send a message with the body (not the subject) consisting of the single word
  142. "help" (without the quotes) for more details.
  143.  
  144. The address for mailing to list members is:
  145. .br
  146.       info-gnuplot@dartmouth.edu
  147. .br
  148.  
  149. Bug reports and code contributions should be mailed to:
  150. .br
  151.       bug-gnuplot@dartmouth.edu
  152. .br
  153.  
  154. The list of those interested in beta-test versions is:
  155. .br
  156.       info-gnuplot-beta@dartmouth.edu
  157. .br
  158.  
  159. There is also a World Wide Web page with up-to-date information, including
  160. known bugs:
  161. .br
  162.       http://www.cs.dartmouth.edu/gnuplot
  163. .br
  164.  
  165. Before seeking help, please check the
  166. FAQ (Frequently Asked Questions) list.
  167. If you do not have a copy of the FAQ, you may request a copy by email from
  168. the Majordomo address above, or see the WWW \fBgnuplot\fR page.
  169.  
  170. When posting a question, please include full details of the version of
  171. \fBgnuplot\fR, the machine, and operating system you are using.  A _small_ script
  172. demonstrating the problem may be useful.  Function plots are preferable to
  173. datafile plots.  If email-ing to info-gnuplot, please state whether or not
  174. you are subscribed to the list, so that users who use news will know to email
  175. a reply to you.  There is a form for such postings on the WWW site.
  176. .sp 2
  177. .NH 1
  178. What's New in version 3.6
  179. .sp 1
  180. .LP
  181. .XS
  182. What's New in version 3.6
  183. .XE
  184. Gnuplot version 3.6 contains many new features.  This section gives a partial
  185. list and links to the new items in no particular order.
  186.  
  187. 1. \fBfit f(x) \&'file\&' via\fR uses the Marquardt-Levenberg method to fit data.
  188. (This is only slightly different from the \fBgnufit\fR patch available for 3.5.)
  189.  
  190. 2. Greatly expanded \fBusing\fR command.  See \fBplot using\fR.
  191.  
  192. 3. \fBset timefmt\fR allows for the use of dates as input and output for time
  193. series plots.  See \fBTime/Date data\fR and
  194. timedat.dem.
  195.  
  196. 4. Multiline labels and font selection in some drivers.
  197.  
  198. 5. Minor (unlabeled) tics.  See \fBset mxtics\fR.
  199.  
  200. 6. \fBkey\fR options for moving the key box in the page (and even outside of the
  201. plot), putting a title on it and a box around it, and more.  See \fBset key\fR.
  202.  
  203. 7. Multiplots on a single logical page with \fBset multiplot\fR.
  204.  
  205. 8. Enhanced \fBpostscript\fR driver with super/subscripts and font changes.
  206. (This was a separate driver (\fBenhpost\fR) that was available as a patch for
  207. 3.5.)
  208.  
  209. 9. Second axes:  use the top and right axes independently of the bottom and
  210. left, both for plotting and labels.  See \fBplot\fR.
  211.  
  212. 10. Special datafile names \fB\&'-\&'\fR and \fB""\fR.  See \fBplot special-filenames\fR.
  213.  
  214. 11. Additional coordinate systems for labels and arrows.  See \fBcoordinates\fR.
  215.  
  216. 12. \fBset size\fR can try to plot with a specified aspect ratio.
  217.  
  218. 13. \fBset missing\fR now treats missing data correctly.
  219.  
  220. 14. The \fBcall\fR command: \fBload\fR with arguments.
  221.  
  222. 15. More flexible \fBrange\fR commands with \fBreverse\fR and \fBwriteback\fR keywords.
  223.  
  224. 16. \fBset encoding\fR for multi-lingual encoding.
  225.  
  226. 17. New \fBx11\fR driver with persistent and multiple windows.
  227.  
  228. 18. New plotting styles: \fBxerrorbars\fR, \fBhisteps\fR, \fBfinancebars\fR and more.
  229. See \fBset style\fR.
  230.  
  231. 19. New tic label formats, including \fB"%l %L"\fR which uses the mantissa and
  232. exponents to a given base for labels.  See \fBset format\fR.
  233.  
  234. 20. New drivers, including \fBcgm\fR for inclusion into MS-Office applications
  235. and \fBgif\fR for serving plots to the WEB.
  236.  
  237. 21. Smoothing and spline-fitting options for \fBplot\fR.  See \fBplot smooth\fR.
  238.  
  239. 22. \fBset margin\fR and \fBset origin\fR give much better control over where a
  240. graph appears on the page.
  241.  
  242. 23. \fBset border\fR now controls each border individually.
  243.  
  244. 24. The new commands \fBif\fR and \fBreread\fR allow command loops.
  245.  
  246. 25. Point styles and sizes, line types and widths can be specified on the
  247. \fBplot\fR command.  Line types and widths can also be specified for grids,
  248. borders, tics and arrows.  See \fBplot with\fR.  Furthermore these types may be
  249. combined and stored for further use.  See \fBset linestyle\fR.
  250.  
  251. 26. Text (labels, tic labels, and the time stamp) can be written vertically
  252. by those terminals capable of doing so.
  253. .sp 2
  254. .NH 1
  255. Command-line-editing
  256. .sp 1
  257. .LP
  258. .XS
  259. Command-line-editing
  260. .XE
  261. Command-line editing is supported by the Unix, Atari, VMS, MS-DOS and OS/2
  262. versions of \fBgnuplot\fR.  Also, a history mechanism allows previous commands to
  263. be edited and re-executed.  After the command line has been edited, a newline
  264. or carriage return will enter the entire line without regard to where the
  265. cursor is positioned.
  266.  
  267. (The readline function in \fBgnuplot\fR is not the same as the readline used in
  268. GNU Bash and GNU Emacs.  If the GNU version is desired, it may be selected
  269. instead of the \fBgnuplot\fR version at compile time.)
  270.  
  271.  
  272. The editing commands are as follows:
  273.  
  274.  
  275. .EQ
  276. delim $$
  277. .EN
  278. .KS
  279. .TS
  280. center box tab (@) ;
  281. c c l .
  282. Character@@Function
  283. _
  284. @@Line Editing
  285. ^B@@move back a single character.
  286. ^F@@move forward a single character.
  287. ^A@@move to the beginning of the line.
  288. ^E@@move to the end of the line.
  289. ^H, DEL@@delete the previous character.
  290. ^D@@delete the current character.
  291. ^K@@delete from current position to the end of line.
  292. ^L, ^R@@redraw line in case it gets trashed.
  293. ^U@@delete the entire line.
  294. ^W@@delete from the current word to the end of line.
  295. _
  296. @@History
  297. ^P@@move back through history.
  298. ^N@@move forward through history.
  299. .TE
  300. .KE
  301. .EQ
  302. delim off
  303. .EN
  304.  
  305.  
  306. On the IBM PC, the use of a TSR program such as DOSEDIT or CED may be desired
  307. for line editing.  The default makefile assumes that this is the case;  by
  308. default \fBgnuplot\fR will be compiled with no line-editing capability.  If you
  309. want to use \fBgnuplot\fR\&'s line editing, set READLINE in the makefile and add
  310. readline.obj to the link file.  The following arrow keys may be used on the
  311. IBM PC and Atari versions if readline is used:
  312.  
  313.  
  314. .EQ
  315. delim $$
  316. .EN
  317. .KS
  318. .TS
  319. center box tab (@) ;
  320. c c l .
  321. Arrow key@@Function
  322. _
  323. Left Arrow@@same as ^B.
  324. Right Arrow@@same as ^F.
  325. Ctrl Left Arrow@@same as ^A.
  326. Ctrl Right Arrow@@same as ^E.
  327. Up Arrow@@same as ^P.
  328. Down Arrow@@same as ^N.
  329. _
  330. .TE
  331. .KE
  332. .EQ
  333. delim off
  334. .EN
  335.  
  336.  
  337. The Atari version of readline defines some additional key aliases:
  338.  
  339.  
  340. .EQ
  341. delim $$
  342. .EN
  343. .KS
  344. .TS
  345. center box tab (@) ;
  346. c c l .
  347. Arrow key@@Function
  348. _
  349. Undo@@same as ^L.
  350. Home@@same as ^A.
  351. Ctrl Home@@same as ^E.
  352. Esc@@same as ^U.
  353. Help@@help plus return.
  354. Ctrl Help@@help .
  355. _
  356. .TE
  357. .KE
  358. .EQ
  359. delim off
  360. .EN
  361.  
  362. .sp 2
  363. .NH 1
  364. Comments
  365. .sp 1
  366. .LP
  367. .XS
  368. Comments
  369. .XE
  370. Comments are supported as follows: a # may appear in most places in a line
  371. and \fBgnuplot\fR will ignore the rest of the line.  It will not have this effect
  372. inside quotes, inside numbers (including complex numbers), inside command
  373. substitutions, etc.  In short, it works anywhere it makes sense to work.
  374. .sp 2
  375. .NH 1
  376. Coordinates
  377. .sp 1
  378. .LP
  379. .XS
  380. Coordinates
  381. .XE
  382. The commands \fBset arrow\fR, \fBset key\fR, and \fBset label\fR allow you to draw
  383. something at an arbitrary position on the graph.  This position is specified
  384. by the syntax:
  385.  
  386. .br
  387.       {<system>} <x>, {<system>} <y> {,{<system>} <z>}
  388. .br
  389.  
  390. Each <system> can either be \fBfirst\fR, \fBsecond\fR, \fBgraph\fR or \fBscreen\fR.
  391.  
  392. \fBfirst\fR places the x, y, or z coordinate in the system defined by the left
  393. and bottom axes; \fBsecond\fR places it in the system defined by the second axes
  394. (top and right); \fBgraph\fR specifies the area within the axes---0,0 is bottom
  395. left and 1,1 is top right (for splot, 0,0,0 is bottom left of plotting area;
  396. use negative z to get to the base---see \fBset ticslevel\fR); and \fBscreen\fR
  397. specifies the screen area (the entire area---not just the portion selected by
  398. \fBset size\fR), with 0,0 at bottom left and 1,1 at top right.
  399.  
  400. If the coordinate system for x is not specified, \fBfirst\fR is used.  If the
  401. system for y is not specified, the one used for x is adopted.
  402.  
  403. If one (or more) axis is timeseries, the appropriate coordinate should
  404. be given as a quoted time string according to the \fBtimefmt\fR format string.
  405. See \fBset xdata\fR and \fBset timefmt\fR.  \fBgnuplot\fR will also accept an integer
  406. expression, which will be interpreted as seconds from 1 January 2000.
  407. .sp 2
  408. .NH 1
  409. Environment
  410. .sp 1
  411. .LP
  412. .XS
  413. Environment
  414. .XE
  415. A number of shell environment variables are understood by \fBgnuplot\fR.  None of
  416. these are required, but may be useful.
  417.  
  418. If GNUTERM is defined, it is used as the name of the terminal type to be
  419. used.  This overrides any terminal type sensed by \fBgnuplot\fR on start-up, but
  420. is itself overridden by the .gnuplot (or equivalent) start-up file (see
  421. \fBstart-up\fR) and, of course, by later explicit changes.
  422.  
  423. On Unix, AmigaDOS, AtariTOS, MS-DOS and OS/2, GNUHELP may be defined to be
  424. the pathname of the HELP file (gnuplot.gih).
  425.  
  426. On VMS, the logical name gnuplot$HELP should be defined as the name of the
  427. help library for \fBgnuplot\fR.  The \fBgnuplot\fR help can be put inside any system
  428. help library, allowing access to help from both within and outside \fBgnuplot\fR
  429. if desired.
  430.  
  431. On Unix, HOME is used as the name of a directory to search for a .gnuplot
  432. file if none is found in the current directory.  On AmigaDOS, AtariTOS,
  433. MS-DOS and OS/2, gnuplot is used.  On VMS, SYS$LOGIN: is used. See \fBhelp
  434. start-up\fR.
  435.  
  436. On Unix, PAGER is used as an output filter for help messages.
  437.  
  438. On Unix, AtariTOS and AmigaDOS, SHELL is used for the \fBshell\fR command.  On
  439. MS-DOS and OS/2, COMSPEC is used for the \fBshell\fR command.
  440.  
  441. On MS-DOS, if the BGI interface is used, BGI is used to point to the full
  442. path of the BGI drivers directory.  Furthermore, SVGA is used to name the
  443. Super VGA BGI driver in 800x600 resolution and its mode of operation is
  444. Name.Mode.  E.g., if the Super VGA driver is
  445. .br
  446.       C:\\TC\\BGI\\SVGADRV.BGI
  447. .br
  448. and mode 3 is used for 800x600 resolution, then use the following:
  449. .br
  450.       set BGI=C:\\TC\\BGI
  451. .br
  452. .br
  453.       set SVGA=SVGADRV.3
  454. .br
  455.  
  456. FIT_SCRIPT may be used to specify a \fBgnuplot\fR command to be executed when a
  457. fit is interrupted---see \fBfit\fR.  FIT_LOG specifies the filename of the
  458. logfile maintained by fit.
  459. .sp 2
  460. .NH 1
  461. Expressions
  462. .sp 1
  463. .LP
  464. .XS
  465. Expressions
  466. .XE
  467. In general, any mathematical expression accepted by C, FORTRAN, Pascal, or
  468. BASIC is valid.  The precedence of these operators is determined by the
  469. specifications of the C programming language.  White space (spaces and tabs)
  470. is ignored inside expressions.
  471.  
  472. Complex constants are expressed as {<real>,<imag>}, where <real> and <imag>
  473. must be numerical constants.  For example, {3,2} represents 3 + 2i; {0,1}
  474. represents \&'i\&' itself.  The curly braces are explicitly required here.
  475.  
  476. Note that gnuplot uses both "real" and "integer" arithmetic, like FORTRAN and
  477. C.  Integers are entered as "1", "-10", etc; reals as "1.0", "-10.0", "1e1",
  478. 3.5e-1, etc.  The most important difference between the two forms is in
  479. division: division of integers truncates: 5/2 = 2; division of reals does
  480. not: 5.0/2.0 = 2.5.  In mixed expressions, integers are "promoted" to reals
  481. before evaluation: 5/2e0 = 2.5.  The result of division of a negative integer
  482. by a positive one may vary among compilers.  Try a test like "print -5/2" to
  483. determine if your system chooses -2 or -3 as the answer.
  484.  
  485. The real and imaginary parts of complex expressions are always real, whatever
  486. the form in which they are entered: in {3,2} the "3" and "2" are reals, not
  487. integers.
  488. .sp 2
  489. .RS
  490. .IP
  491. .NH 2
  492. Functions
  493. .sp 1
  494. .LP
  495. .XS
  496. Functions
  497. .XE
  498. The functions in \fBgnuplot\fR are the same as the corresponding functions in
  499. the Unix math library, except that all functions accept integer, real, and
  500. complex arguments, unless otherwise noted.
  501.  
  502. For those functions that accept or return angles that may be given in either
  503. degrees or radians (sin(x), cos(x), tan(x), asin(x), acos(x), atan(x),
  504. atan2(x) and arg(z)), the unit may be selected by \fBset angles\fR, which
  505. defaults to radians.
  506.  
  507.  
  508. .EQ
  509. delim $$
  510. .EN
  511. .KS
  512. .TS
  513. center box tab (@) ;
  514. c c l .
  515. Function@Arguments@Returns
  516. _
  517. abs(x)@any@absolute value of x, $|x|$; same type
  518. abs(x)@complex@length of x, $sqrt{roman real (x) sup 2 + roman imag (x) sup 2}$
  519. acos(x)@any@$cos sup -1 x$ (inverse cosine)
  520. acosh(x)@any@$cosh sup -1 x$ (inverse hyperbolic cosine) in radians
  521. arg(x)@complex@the phase of $x$
  522. asin(x)@any@$sin sup -1 x$ (inverse sin)
  523. asinh(x)@any@$sinh sup -1 x$ (inverse hyperbolic sin) in radians
  524. atan(x)@any@$tan sup -1 x$ (inverse tangent)
  525. atan2(y,x)@int or real@$tan sup -1 (y/x)$ (inverse tangent)
  526. atanh(x)@any@$tanh sup -1 x$ (inverse hyperbolic tangent) in radians
  527. besj0(x)@int or real@$j sub 0$ Bessel function of $x$, in radians
  528. besj1(x)@int or real@$j sub 1$ Bessel function of $x$, in radians
  529. besy0(x)@int or real@$y sub 0$ Bessel function of $x$, in radians
  530. besy1(x)@int or real@$y sub 1$ Bessel function of $x$, in radians
  531. ceil(x)@any@$left ceiling x right ceiling$, smallest integer not less than $x$ (real part)
  532. cos(x)@radians@$cos~x$, cosine of $x$
  533. cosh(x)@any@$cosh~x$, hyperbolic cosine of $x$ in radians
  534. erf(x)@any@$erf ( roman real (x))$, error function of real ($x$)
  535. erfc(x)@any@$erfc ( roman real (x))$, 1.0 - error function of real ($x$)
  536. exp(x)@any@$e sup x$, exponential function of $x$
  537. floor(x)@any@$left floor x right floor$, largest integer not greater than $x$ (real part)
  538. gamma(x)@any@$GAMMA ( roman real (x))$, gamma function of real ($x$)
  539. ibeta(p,q,x)@any@$Ibeta ( roman real (p,q,x))$, ibeta function of real ($p$,$q$,$x$)
  540. inverf(x)@any@inverse error function real($x$)
  541. igamma(a,x)@any@$Igamma ( roman real (a,x))$, igamma function of real ($a$,$x$)
  542. imag(x)@complex@imaginary part of $x$ as a real number
  543. invnorm(x)@any@inverse normal distribution function real($x$)
  544. int(x)@real@integer part of $x$, truncated toward zero
  545. lgamma(x)@any@$Lgamma ( roman real (x))$, lgamma function of real ($x$)
  546. log(x)@any@$ln~x$, natural logarithm (base $e$) of $x$
  547. log10(x)@any@${log sub 10}~x$, logarithm (base $10$) of $x$
  548. norm(x)@any@$norm(x)$, normal distribution function of real($x$)
  549. rand(x)@any@$rand ( roman real (x))$, pseudo random number generator
  550. real(x)@any@real part of $x$
  551. sgn(x)@any@1 if $x > 0$, -1 if $x < 0$, 0 if $x = 0$. $roman imag (x)$ ignored
  552. sin(x)@any@$sin~x$, sine of $x$
  553. sinh(x)@any@$sinh~x$, hyperbolic sine $x$ in radians
  554. sqrt(x)@any@$sqrt x $, square root of $x$
  555. tan(x)@any@$tan~x$, tangent of $x$
  556. tanh(x)@any@$tanh~x$, hyperbolic tangent of $x$ in radians
  557. .TE
  558. .KE
  559. .EQ
  560. delim off
  561. .EN
  562.  
  563.  
  564. A few additional functions are also available.
  565.  
  566.  
  567. .EQ
  568. delim $$
  569. .EN
  570. .KS
  571. .TS
  572. center box tab (@) ;
  573. c c l .
  574. Function@Arguments@Returns
  575. _
  576. column(x)@int@ column $x$ during datafile manipulation.
  577. tm_hour(x)@int@the hour
  578. tm_mday(x)@int@the day of the month
  579. tm_min(x)@int@the minute
  580. tm_mon(x)@int@the month
  581. tm_sec(x)@int@the second
  582. tm_wday(x)@int@the day of the week
  583. tm_yday(x)@int@the day of the year
  584. tm_year(x)@int@the year
  585. valid(x)@int@ test validity of column($x$) during datafile manip.
  586. .TE
  587. .KE
  588. .EQ
  589. delim off
  590. .EN
  591.  
  592. .sp 2
  593. .NH 2
  594. Operators
  595. .sp 1
  596. .LP
  597. .XS
  598. Operators
  599. .XE
  600. The operators in \fBgnuplot\fR are the same as the corresponding operators in the
  601. C programming language, except that all operators accept integer, real, and
  602. complex arguments, unless otherwise noted.  The ** operator (exponentiation)
  603. is supported, as in FORTRAN.
  604.  
  605. Parentheses may be used to change order of evaluation.
  606. .sp 2
  607. .RS
  608. .IP
  609. .NH 3
  610. Unary
  611. .sp 1
  612. .LP
  613. .XS
  614. Unary
  615. .XE
  616. The following is a list of all the unary operators and their usages:
  617.  
  618.  
  619. .EQ
  620. delim $$
  621. .EN
  622. .KS
  623. .TS
  624. center box tab (@) ;
  625. c c l .
  626. .TE
  627. .EQ
  628. delim off
  629. .EN
  630. .TS
  631. center box tab (@) ;
  632. c c l .
  633. Symbol@Example@Explanation
  634. _
  635. -@-a@unary minus
  636. +@+a@unary plus (no-operation)
  637. ~@~a@* one's complement
  638. !@!a@* logical negation
  639. !@a!@* factorial
  640. $@$3@* call arg/column during `using` manipulation
  641. _
  642. .TE
  643. .KE
  644. .EQ
  645. delim off
  646. .EN
  647.  
  648. (*) Starred explanations indicate that the operator requires an integer
  649. argument.
  650.  
  651. Operator precedence is the same as in Fortran and C.  As in those languages,
  652. parentheses may be used to change the order of operation.  Thus -2**2 = -4,
  653. but (-2)**2 = 4.
  654.  
  655. The factorial operator returns a real number to allow a greater range.
  656. .sp 2
  657. .NH 3
  658. Binary
  659. .sp 1
  660. .LP
  661. .XS
  662. Binary
  663. .XE
  664. The following is a list of all the binary operators and their usages:
  665.  
  666.  
  667. .EQ
  668. delim $$
  669. .EN
  670. .KS
  671. .TS
  672. center box tab (@) ;
  673. c c l .
  674. Symbol@Example@Explanation
  675. _
  676. **@a**b@exponentiation
  677. *@a*b@multiplication
  678. /@a/b@division
  679. %@a%b@* modulo
  680. +@a+b@addition
  681. -@a-b@subtraction
  682. ==@a==b@equality
  683. !=@a!=b@inequality
  684. <@a<b@less than
  685. <=@a<=b@less than or equal to
  686. >@a>b@greater than
  687. >=@a>=b@greater than or equal to
  688. &@a&b@* bitwise AND
  689. ^@a^b@* bitwise exclusive OR
  690. |@a|b@* bitwise inclusive OR
  691. &&@a&&b@* logical AND
  692. ||@a||b@* logical OR
  693. .TE
  694. .KE
  695. .EQ
  696. delim off
  697. .EN
  698.  
  699. (*) Starred explanations indicate that the operator requires integer
  700. arguments.
  701.  
  702. Logical AND (&&) and OR (||) short-circuit the way they do in C.  That is,
  703. the second \fB&&\fR operand is not evaluated if the first is false; the second
  704. \fB||\fR operand is not evaluated if the first is true.
  705. .sp 2
  706. .NH 3
  707. Ternary
  708. .sp 1
  709. .LP
  710. .XS
  711. Ternary
  712. .XE
  713. There is a single ternary operator:
  714.  
  715.  
  716. .EQ
  717. delim $$
  718. .EN
  719. .KS
  720. .TS
  721. center box tab (@) ;
  722. c c l .
  723. Symbol@Example@Explanation
  724. _
  725. ?:@a?b:c@* ternary operation
  726. .TE
  727. .KE
  728. .EQ
  729. delim off
  730. .EN
  731.  
  732. The ternary operator behaves as it does in C.  The first argument (a), which
  733. must be an integer, is evaluated.  If it is true (non-zero), the second
  734. argument (b) is evaluated and returned; otherwise the third argument (c) is
  735. evaluated and returned.
  736.  
  737. The ternary operator is very useful both in constructing piecewise functions
  738. and in plotting points only when certain conditions are met.
  739.  
  740. Examples:
  741.  
  742. Plot a function that is to equal sin(x) for 0 <= x < 1, 1/x for 1 <= x < 2,
  743. and undefined elsewhere:
  744. .br
  745.       f(x) = 0<=x && x<1 ? sin(x) : 1<=x && x<2 ? 1/x : 1/0
  746. .br
  747. .br
  748.       plot f(x)
  749. .br
  750. Note that \fBgnuplot\fR quietly ignores undefined values, so the final branch of
  751. the function (1/0) will produce no plottable points.  Note also that f(x)
  752. will be plotted as a continuous function across the discontinuity if a line
  753. style is used.  To plot it discontinuously, create separate functions for the
  754. two pieces.  (Parametric functions are also useful for this purpose.)
  755.  
  756. For data in a file, plot the average of the data in columns 2 and 3 against
  757. the datum in column 1, but only if the datum in column 4 is non-negative:
  758.  
  759. .br
  760.       plot 'file' using 1:( $4<0 ? 1/0 : ($2+$3)/2 )
  761. .br
  762.  
  763. Please see \fBplot data-file using\fR for an explanation of the \fBusing\fR syntax.
  764. .sp 2
  765. .RE
  766. .br
  767. .NH 2
  768. User-defined
  769. .sp 1
  770. .LP
  771. .XS
  772. User-defined
  773. .XE
  774. New user-defined variables and functions of one through five variables may
  775. be declared and used anywhere, including on the \fBplot\fR command itself.
  776.  
  777. User-defined function syntax:
  778. .br
  779.       <func-name>( <dummy1> {,<dummy2>} ... {,<dummy5>} ) = <expression>
  780. .br
  781.  
  782. where <expression> is defined in terms of <dummy1> through <dummy5>.
  783.  
  784. User-defined variable syntax:
  785. .br
  786.       <variable-name> = <constant-expression>
  787. .br
  788.  
  789. Examples:
  790. .br
  791.       w = 2
  792. .br
  793. .br
  794.       q = floor(tan(pi/2 - 0.1))
  795. .br
  796. .br
  797.       f(x) = sin(w*x)
  798. .br
  799. .br
  800.       sinc(x) = sin(pi*x)/(pi*x)
  801. .br
  802. .br
  803.       delta(t) = (t == 0)
  804. .br
  805. .br
  806.       ramp(t) = (t > 0) ? t : 0
  807. .br
  808. .br
  809.       min(a,b) = (a < b) ? a : b
  810. .br
  811. .br
  812.       comb(n,k) = n!/(k!*(n-k)!)
  813. .br
  814. .br
  815.       len3d(x,y,z) = sqrt(x*x+y*y+z*z)
  816. .br
  817. .br
  818.       plot f(x) = sin(x*a), a = 0.2, f(x), a = 0.4, f(x)
  819. .br
  820.  
  821. Note that the variable \fBpi\fR is already defined.  But it is in no way magic;
  822. you may redefine it to be whatever you like.
  823.  
  824. Valid names are the same as in most programming languages: they must begin
  825. with a letter, but subsequent characters may be letters, digits, "$", or "_".
  826. Note, however, that the \fBfit\fR mechanism uses several variables with names
  827. that begin "FIT_".  It is safest to avoid using such names.  "FIT_LIMIT",
  828. however, is one that you may wish to redefine.
  829.  
  830. See \fBshow functions\fR and \fBshow variables\fR.
  831. .sp 2
  832. .RE
  833. .br
  834. .NH 1
  835. Glossary
  836. .sp 1
  837. .LP
  838. .XS
  839. Glossary
  840. .XE
  841. Throughout this document an attempt has been made to maintain consistency of
  842. nomenclature.  This cannot be wholly successful because as \fBgnuplot\fR has
  843. evolved over time, certain command and keyword names have been adopted that
  844. preclude such perfection.  This section contains explanations of the way
  845. some of these terms are used.
  846.  
  847. A "page" or "screen" is the entire area addressable by \fBgnuplot\fR.  On a
  848. monitor, it is the full screen; on a plotter, it is a single sheet of
  849. paper.
  850.  
  851. A screen may contain one or more "plots".  A plot is defined by an
  852. abscissa and an ordinate, although these need not actually appear on it, as
  853. well as the margins and any text written therein.
  854.  
  855. A plot contains one "graph".  A graph is defined by an abscissa and an
  856. ordinate, although these need not actually appear on it.
  857.  
  858. A graph may contain one or more "lines".  A line is a single function or
  859. data set.  "Line" is also a plotting style.  The word will also be used in
  860. sense "a line of text".  Presumably the context will always remove the
  861. ambiguity.
  862.  
  863. The lines on a graph may have individual names.  These may be listed together
  864. with a sample of the plotting style used to represent them in the "key",
  865. sometimes also called the "legend".
  866.  
  867. The word "title" occurs with multiple meanings in \fBgnuplot\fR.  In this
  868. document, it will always be preceded by the adjective "plot", "line", or
  869. "key" to differentiate among them.
  870.  
  871. A graph may have up to four labelled axes.  Various commands have the name of
  872. an axis built into their names, such as \fBset xlabel\fR.  Other commands have
  873. one or more axis names as options, such as \fBset logscale xy\fR.  The names of
  874. the four axes for these usages are "x" for the axis along the bottom border
  875. of the plot, "y" for the left border, "x2" for the top border, and "y2" for
  876. the right border.  "z" also occurs in commands used with 3-d plotting.
  877.  
  878. When discussing data files, the term "record" will be resurrected and used to
  879. denote a single line in the file, that is, the characters between newline or
  880. end-of-record characters.  A "point" is the datum on a single record, and a
  881. "dataline" is a set of points on consecutive records, delimited by blank
  882. records.
  883. .sp 2
  884. .NH 1
  885. Plotting
  886. .sp 1
  887. .LP
  888. .XS
  889. Plotting
  890. .XE
  891. There are three \fBgnuplot\fR commands which actually create a plot: \fBplot\fR,
  892. \fBsplot\fR and \fBreplot\fR.  \fBplot\fR generates 2-d plots, \fBsplot\fR generates 3-d
  893. plots (actually 2-d projections, of course), and \fBreplot\fR appends its
  894. arguments to the previous \fBplot\fR or \fBsplot\fR and executes the modified
  895. command.
  896.  
  897. Much of the general information about plotting can be found in the discussion
  898. of \fBplot\fR; information specific to 3-d can be found in the \fBsplot\fR section.
  899.  
  900. \fBplot\fR operates in either rectangular or polar coordinates -- see \fBset polar\fR
  901. for details of the latter.  \fBsplot\fR operates only in rectangular coordinates,
  902. but the \fBset mapping\fR command allows for a few other coordinate systems to be
  903. treated.  In addition, the \fBusing\fR option allows both \fBplot\fR and \fBsplot\fR to
  904. treat almost any coordinate system you\&'d care to define.
  905.  
  906. \fBsplot\fR can plot surfaces and contours in addition to lines.  See \fBsplot
  907. datafile\fR for information about the requisite file structure for both of
  908. these; see \fBset isosamples\fR for information about defining the grid for a 3-d
  909. function.  See \fBset contour\fR and \fBset cntrparam\fR for information about
  910. contours.
  911. .sp 2
  912. .NH 1
  913. Start-up
  914. .sp 1
  915. .LP
  916. .XS
  917. Start-up
  918. .XE
  919. When \fBgnuplot\fR is run, it looks for an initialization file to load.  This
  920. file is called \fB.gnuplot\fR on Unix and AmigaDOS systems, and \fBGNUPLOT.INI\fR
  921. on other systems.  If this file is not found in the current directory, the
  922. program will look for it in the home directory (under AmigaDOS,
  923. Atari(single)TOS, MS-DOS and OS/2, the environment variable \fBgnuplot\fR should
  924. contain the name of this directory).  Note: if NOCWDRC is defined during the
  925. installation, \fBgnuplot\fR will not read from the current directory.
  926.  
  927. If the initialization file is found, \fBgnuplot\fR executes the commands in it.
  928. These may be any legal \fBgnuplot\fR commands, but typically they are limited to
  929. setting the terminal and defining frequently-used functions or variables.
  930. .sp 2
  931. .NH 1
  932. Substitution
  933. .sp 1
  934. .LP
  935. .XS
  936. Substitution
  937. .XE
  938. Command-line substitution is specified by a system command enclosed in
  939. backquotes.  This command is spawned and the output it produces replaces
  940. the name of the command (and backquotes) on the command line.
  941.  
  942. Newlines in the output produced by the spawned command are replaced with
  943. blanks.
  944.  
  945. Command-line substitution can be used anywhere on the \fBgnuplot\fR command
  946. line.
  947.  
  948. Example:
  949.  
  950. This will run the program \fBleastsq\fR and replace \fBleastsq\fR (including
  951. backquotes) on the command line with its output:
  952. .br
  953.       f(x) = `leastsq`
  954. .br
  955.  
  956. or, in VMS
  957. .br
  958.       f(x) = `run leastsq`
  959. .br
  960. .sp 2
  961. .NH 1
  962. Syntax
  963. .sp 1
  964. .LP
  965. .XS
  966. Syntax
  967. .XE
  968. The general rules of syntax and punctuation in \fBgnuplot\fR are that keywords
  969. and options are order-dependent.  Options and any accompanying parameters are
  970. separated by spaces whereas lists and coordinates are separated by commas.
  971. Ranges are separated by colons and enclosed in braces [], text and file names
  972. are enclosed in quotes, and a few miscellaneous things are enclosed in
  973. parentheses.  Brackets {} are used for a few special purposes.
  974.  
  975. Commas are used to separate coordinates on the \fBset\fR commands \fBarrow\fR,
  976. \fBkey\fR, and \fBlabel\fR; the list of variables being fitted (the list after the
  977. \fBvia\fR keyword on the \fBfit\fR command); lists of discrete contours or the loop
  978. parameters which specify them on the \fBset cntrparam\fR command; the arguments
  979. of the \fBset\fR commands \fBdgrid3d\fR, \fBdummy\fR, \fBisosamples\fR, \fBoffsets\fR, \fBorigin\fR,
  980. \fBsamples\fR, \fBsize\fR, \fBtime\fR, and \fBview\fR; lists of tics or the loop parameters
  981. which specify them; the offsets for titles and axis labels; parametric
  982. functions to be used to calculate the x, y, and z coordinates on the \fBplot\fR,
  983. \fBreplot\fR and \fBsplot\fR commands; and the complete sets of keywords specifying
  984. individual plots (data sets or functions) on the \fBplot\fR, \fBreplot\fR and \fBsplot\fR
  985. commands.
  986.  
  987. Parentheses are used to delimit sets of explicit tics (as opposed to loop
  988. parameters) and to indicate computations in the \fBusing\fR filter of the \fBfit\fR,
  989. \fBplot\fR, \fBreplot\fR and \fBsplot\fR commands.
  990.  
  991. (Parentheses and commas are also used as usual in function notation.)
  992.  
  993. Braces are used to delimit ranges, whether they are given on \fBset\fR, \fBplot\fR or
  994. \fBsplot\fR commands.
  995.  
  996. Colons are used to separate extrema in \fBrange\fR specifications (whether they
  997. are given on \fBset\fR, \fBplot\fR or \fBsplot\fR commands) and to separate entries in
  998. the \fBusing\fR filter of the \fBplot\fR, \fBreplot\fR, \fBsplot\fR and \fBfit\fR commands.
  999.  
  1000. Semicolons are used to separate commands given on a single command line.
  1001.  
  1002. Brackets are used in text to be specially processed by some terminals, like
  1003. \fBpostscript\fR.  They are also used to denote complex numbers: {3,2} = 3 + 2i.
  1004.  
  1005. Text may be enclosed in single- or double-quotes.  Backslash processing of
  1006. sequences like \\n (newline) and \\345 (octal character code) is performed for
  1007. double-quoted strings, but not for single-quoted strings.
  1008.  
  1009. The justification is the same for each line of a multi-line string.  Thus the
  1010. center-justified string
  1011. .br
  1012.       "This is the first line of text.\\nThis is the second line."
  1013. .br
  1014. will produce
  1015. .br
  1016.                        This is the first line of text.
  1017. .br
  1018. .br
  1019.                           This is the second line.
  1020. .br
  1021. but
  1022. .br
  1023.       'This is the first line of text.\\nThis is the second line.'
  1024. .br
  1025. will produce
  1026. .br
  1027.           This is the first line of text.\\nThis is the second line.
  1028. .br
  1029.  
  1030. At present you should not embed \\n inside {} when using the enhanced option
  1031. of the postscript terminal.
  1032.  
  1033. The EEPIC, Imagen, Uniplex, LaTeX, and TPIC drivers allow a newline to be
  1034. specified by \\\\ in a single-quoted string or \\\\\\\\ in a double-quoted string.
  1035.  
  1036. Back-quotes are used to enclose system commands for substitution.
  1037. .sp 2
  1038. .NH 1
  1039. Time/Date data
  1040. .sp 1
  1041. .LP
  1042. .XS
  1043. Time/Date data
  1044. .XE
  1045. \fBgnuplot\fR supports the use of time and/or date information as input data.
  1046. This feature is activated by the commands \fBset xdata time\fR, \fBset ydata time\fR,
  1047. etc.
  1048.  
  1049. Internally all times and dates are converted to the number of seconds from
  1050. the year 2000.  The command \fBset timefmt\fR defines the format for all inputs:
  1051. data files, ranges, tics, label positions---in short, anything that accepts a
  1052. data value must receive it in this format.  Since only one input format can
  1053. be in force at a given time, all time/date quantities being input at the same
  1054. time must be presented in the same format.  Thus if both x and y data in a
  1055. file are time/date, they must be in the same format.
  1056.  
  1057. Commands like \fBshow xrange\fR will re-interpret the integer according to
  1058. \fBtimefmt\fR.  If you change \fBtimefmt\fR, and then \fBshow\fR the quantity again, it
  1059. will be displayed in the new \fBtimefmt\fR.  For that matter, if you give the
  1060. deactivation command (like \fBset xdata\fR), the quantity will be shown in its
  1061. numerical form.
  1062.  
  1063. The command \fBset format\fR defines the format that will be used for tic labels,
  1064. whether or not the specified axis is time/date.
  1065.  
  1066. If time/date information is to be plotted from a file, the \fBusing\fR option
  1067. _must_ be used on the \fBplot\fR or \fBsplot\fR command.  These commands simply use
  1068. white space to separate columns, but white space may be embedded within the
  1069. time/date string.  If you use tabs as a separator, some trial-and-error may
  1070. be necessary to discover how your system treats them.
  1071.  
  1072. The following example demonstrates time/date plotting.
  1073.  
  1074. Suppose the file "data" contains records like
  1075.  
  1076. .br
  1077.       03/21/95 10:00  6.02e23
  1078. .br
  1079.  
  1080. This file can be plotted by
  1081.  
  1082. .br
  1083.       set xdata time
  1084. .br
  1085. .br
  1086.       set timefmt "%m/%d"
  1087. .br
  1088. .br
  1089.       set xrange ["03/21":"03/22"]
  1090. .br
  1091. .br
  1092.       set format x "%m/%d"
  1093. .br
  1094. .br
  1095.       set timefmt "%m/%d/%y %H:%M"
  1096. .br
  1097. .br
  1098.       plot "data" using 1:3
  1099. .br
  1100.  
  1101. which will produce xtic labels that look like "03/21".
  1102.  
  1103. See the descriptions of each command for more details.
  1104. .sp 3
  1105. .NH 1
  1106. Commands
  1107. .sp 1
  1108. .LP
  1109. .XS
  1110. Commands
  1111. .XE
  1112. .sp 2
  1113. .NH 1
  1114. Cd
  1115. .sp 1
  1116. .LP
  1117. .XS
  1118. Cd
  1119. .XE
  1120. The \fBcd\fR command changes the working directory.
  1121.  
  1122. Syntax:
  1123. .br
  1124.       cd '<directory-name>'
  1125. .br
  1126.  
  1127. The directory name must be enclosed in quotes.
  1128.  
  1129. Examples:
  1130. .br
  1131.       cd 'subdir'
  1132. .br
  1133. .br
  1134.       cd ".."
  1135. .br
  1136.  
  1137. DOS users _must_ use single-quotes---backslash [\\] has special significance
  1138. inside double-quotes.  For example,
  1139. .br
  1140.       cd "c:\\newdata"
  1141. .br
  1142. fails, but
  1143. .br
  1144.       cd 'c:\\newdata'
  1145. .br
  1146. works as expected.
  1147. .sp 2
  1148. .NH 1
  1149. Call
  1150. .sp 1
  1151. .LP
  1152. .XS
  1153. Call
  1154. .XE
  1155. The \fBcall\fR command is identical to the load command with one exception: you
  1156. can have up to ten additional parameters to the command (delimited according
  1157. to the standard parser rules) which can be substituted into the lines read
  1158. from the file.  As each line is read from the \fBcall\fRed input file, it is
  1159. scanned for the sequence \fB$\fR (dollar-sign) followed by a digit (0--9).  If
  1160. found, the sequence is replaced by the corresponding parameter from the
  1161. \fBcall\fR command line.  If the parameter was specified as a string in the
  1162. \fBcall\fR line, it is substituted without its enclosing quotes.  \fB$\fR followed by
  1163. any character other than a digit will be that character.  E.g. use \fB$$\fR to
  1164. get a single \fB$\fR.  Providing more than ten parameters on the \fBcall\fR command
  1165. line will cause an error.  A parameter that was not provided substitutes as
  1166. nothing.  Files being \fBcall\fRed may themselves contain \fBcall\fR or \fBload\fR
  1167. commands.
  1168.  
  1169. The \fBcall\fR command _must_ be the last command on a multi-command line.
  1170.  
  1171. Syntax:
  1172. .br
  1173.       call "<input-file>" <parameter-0> <parm-1> ... <parm-9>
  1174. .br
  1175.  
  1176. The name of the input file must be enclosed in quotes, and it is recommended
  1177. that parameters are similarly enclosed in quotes (future versions of gnuplot
  1178. may treat quoted and unquoted arguments differently).
  1179.  
  1180. Example:
  1181.  
  1182. If the file \&'calltest.gp\&' contains the line:
  1183. .br
  1184.       print "p0=$0 p1=$1 p2=$2 p3=$3 p4=$4 p5=$5 p6=$6 p7=x$7x"
  1185. .br
  1186.  
  1187. entering the command:
  1188. .br
  1189.       call 'calltest.gp' "abcd" 1.2 + "'quoted'" -- "$2"
  1190. .br
  1191.  
  1192. will display:
  1193. .br
  1194.       p0=abcd p1=1.2 p2=+ p3='quoted' p4=- p5=- p6=$2 p7=xx
  1195. .br
  1196.  
  1197. NOTE: there is a clash in syntax with the datafile \fBusing\fR callback
  1198. operator.  Use \fB$$n\fR or \fBcolumn(n)\fR to access column n from a datafile inside
  1199. a \fBcall\fRed datafile plot.
  1200. .sp 2
  1201. .NH 1
  1202. Clear
  1203. .sp 1
  1204. .LP
  1205. .XS
  1206. Clear
  1207. .XE
  1208. The \fBclear\fR command erases the current screen or output device as specified
  1209. by \fBset output\fR.  This usually generates a formfeed on hardcopy devices.  Use
  1210. \fBset terminal\fR to set the device type.
  1211.  
  1212. For some terminals \fBclear\fR erases only the portion of the plotting surface
  1213. defined by \fBset size\fR, so for these it can be used in conjunction with \fBset
  1214. multiplot\fR to create an inset.
  1215.  
  1216. Example:
  1217. .br
  1218.       set multiplot
  1219. .br
  1220. .br
  1221.       plot sin(x)
  1222. .br
  1223. .br
  1224.       set origin 0.5,0.5
  1225. .br
  1226. .br
  1227.       set size 0.4,0.4
  1228. .br
  1229. .br
  1230.       clear
  1231. .br
  1232. .br
  1233.       plot cos(x)
  1234. .br
  1235. .br
  1236.       set nomultiplot
  1237. .br
  1238.  
  1239. Please see \fBset multiplot\fR, \fBset size\fR, and \fBset origin\fR for details of these
  1240. commands.
  1241. .sp 2
  1242. .NH 1
  1243. Exit
  1244. .sp 1
  1245. .LP
  1246. .XS
  1247. Exit
  1248. .XE
  1249. The commands \fBexit\fR and \fBquit\fR and the END-OF-FILE character will exit
  1250. \fBgnuplot\fR.  Each of these commands will clear the output device (as does
  1251. the \fBclear\fR command) before exiting.
  1252. .sp 2
  1253. .NH 1
  1254. Fit
  1255. .sp 1
  1256. .LP
  1257. .XS
  1258. Fit
  1259. .XE
  1260. This implementation incorporates the capability of nonlinear least squares
  1261. fitting using the Marquardt-Levenberg Algorithm.  It may fit any user-defined
  1262. function to any set of data points (x,y) or (x,y,z).  x, y, z and the
  1263. function\&'s return type _must_ be real!  Any variable occurring in the
  1264. function body may serve as a fit parameter (fitting functions without
  1265. adjustable parameters make no sense).
  1266.  
  1267. Syntax:
  1268. .br
  1269.       fit {[xrange]} {[yrange]} <function>
  1270. .br
  1271. .br
  1272.           '<datafile>' {datafile-modifiers}
  1273. .br
  1274. .br
  1275.            via {'<parameter file>' | <var1>,<var2>,...}
  1276. .br
  1277.  
  1278. Notice that \fBvia\fR is now a required keyword, to distinguish it from a \&'scanf\&'
  1279. format string.
  1280.  
  1281. [xrange] and [yrange] are of the form [{variable=}{<min>}{:<max>}], allowing
  1282. the range of the fit to be limited temporarily in a manner analogous to
  1283. \fBplot\fR.  <function> is any valid \fBgnuplot\fR expression, although it is usual
  1284. to use a previously user-defined function of the form f(x) or f(x,y).
  1285. <datafile> is treated as in the \fBplot\fR command.  All the modifiers for
  1286. datafiles (\fBusing\fR, \fBevery\fR,...) in \fBplot\fR are available here (except
  1287. \fBsmooth\fR)---see \fBplot datafile\fR for full details.  The default columns for x
  1288. and y are 1 and 2.  These may be changed by the \fBusing x:y\fR mechanism.  If
  1289. \fBusing\fR has a third entry (a column or an expression), it will be interpreted
  1290. as the standard deviation of each y value and will be used to compute the
  1291. weight; otherwise all data will be weighted equally.  If four columns are
  1292. specified, they are x:y:z:error---note that an error _must_ be specified in
  1293. order to perform a 3-d fit.  If errors are not available, a constant value
  1294. can be specified, e.g., \fBusing ...:(1)\fR.
  1295.  
  1296. Initial values for the parameters to be fit may be specified in a (load-)file
  1297. wherein each line is of the form:
  1298.  
  1299. .br
  1300.       varname = value
  1301. .br
  1302.  
  1303. Comments, marked by \&'#\&', and blank lines are permissible.  The special form
  1304.  
  1305. .br
  1306.       varname = value       # FIXED
  1307. .br
  1308.  
  1309. means that the variable is treated as a \fBfixed parameter\fR that is initialized
  1310. but will not be adjusted.  It is not necessary (but sometimes useful for
  1311. clarity) to specify them at all.  The keyword \fB# FIXED\fR has to appear in
  1312. exactly this form.
  1313.  
  1314. The other means of specifying the adjustable parameters is to provide a
  1315. comma-separated list of variable names after the \fBvia\fR keyword.  If any of
  1316. these variables do not yet exist within the current \fBgnuplot\fR session, they
  1317. are created with an initial value of 1.0, but the fit is more likely to
  1318. converge if a more appropriate starting value is given.  If this form is
  1319. used, it may prove beneficial to iterate the fit, allowing only one or two
  1320. variables to be adjusted at a time until a reasonably close fit is obtained,
  1321. before allowing \fBfit\fR to vary all parameters.
  1322.  
  1323. After each iteration step, detailed information is given about the fit\&'s
  1324. state, both on the screen and on a logfile "fit.log".  This file will never be
  1325. erased but always appended to so that the fit\&'s history isn\&'t lost.  After
  1326. each iteration step, the fit may be interrupted by pressing Ctrl-C (any key
  1327. _but_ Ctrl-C under MSDOS and Atari Multitasking Systems).  Then you have the
  1328. options of stopping (and accepting the current parameter values), continuing
  1329. the iteration of the fit, or executing a \fBgnuplot\fR command specified by an
  1330. environment variable FIT_SCRIPT.  A \fBplot\fR or \fBload\fR command may be useful in
  1331. this context.
  1332.  
  1333. Special \fBgnuplot\fR variables:
  1334.  
  1335. .br
  1336.       FIT_LIMIT
  1337. .br
  1338. may be specified to change the default epsilon limit (1e-5).  When the sum
  1339. of squared residuals changes between two iteration steps by less than a
  1340. factor of this number, the fit is considered to have \&'converged\&'.
  1341.  
  1342. Once the fit is converged, the final values may be stored in (load-)file
  1343. suitable for use as an initial-value file, as discussed above.  Please see
  1344. \fBupdate\fR for details.
  1345.  
  1346. .br
  1347.       FIT_MAXITER
  1348. .br
  1349. may be specified to limit the number of iterations performed without
  1350. convergence by FIT_LIMIT.  A value of 0 (or not defining it at all) means
  1351. that there is no limit.
  1352.  
  1353. [FIT_SKIP was available in previous releases of gnufit.  Its functionality
  1354. is now obtained using the \fBevery\fR modifier for datafiles.  FIT_INDEX was
  1355. previously available in order to allow multi-branch fitting.  Multi-branch
  1356. fitting in 2-d can now be done as a pseudo-3-d fit in which the y values are
  1357. the dataline number (\fBusing 1:-1:...\fR) or index (\fBusing 1:-2:...\fR).]
  1358.  
  1359. Environment variables:
  1360.  
  1361. .br
  1362.       FIT_LOG
  1363. .br
  1364. changes the logfile\&'s path from \&'./fit.log\&' (write permission is necessary).
  1365.  
  1366. .br
  1367.       FIT_SCRIPT
  1368. .br
  1369. specifies a command to be executed after an user interrupt.
  1370.  
  1371. Examples:
  1372. .br
  1373.       f(x) = a*x**2 + b*x + c
  1374. .br
  1375. .br
  1376.       FIT_LIMIT = 1e-6
  1377. .br
  1378. .br
  1379.       fit f(x) 'measured.dat' via 'start.par'
  1380. .br
  1381. .br
  1382.       fit f(x) 'measured.dat' using 3:($7-5) via 'start.par'
  1383. .br
  1384. .br
  1385.       fit f(x) './data/trash.dat' using 1:2:3 via a, b, c
  1386. .br
  1387. .br
  1388.       fit f(x,y) 'surface.dat' using 1:2:3:(1) via a, b, c
  1389. .br
  1390. .sp 2
  1391. .RS
  1392. .IP
  1393. .NH 2
  1394. Introduction To Fitting
  1395. .sp 1
  1396. .LP
  1397. .XS
  1398. Introduction To Fitting
  1399. .XE
  1400. Beginner\&'s guide to fitting in general
  1401.  
  1402. \fBfit\fR is used to find a set of parameters to be used in a parametric function
  1403. to make it fit to your data optimally.  The quantity to be minimized is the
  1404. sum of squared differences between your input data points and the function
  1405. values at the same places, usually called \&'chisquared\&' (i.e. the Greek letter
  1406. chi, to the power of 2).  (To be precise, the differences will be divided by
  1407. the input data errors before being squared; see \fBfit errors\fR for details.)
  1408.  
  1409. Now that you know why it\&'s called \&'least squares fitting\&', let\&'s see why it\&'s
  1410. \&\&'nonlinear\&'.  That\&'s because the function\&'s dependence on the parameters (not
  1411. the data!) may be non-linear.  Of course, this might not tell you much if you
  1412. didn\&'t know already, so let me try to describe it.  If the fitting problem
  1413. were to be linear, the target function would have to be a sum of simple,
  1414. non-parametric functions, each multiplied by one parameter.  (For example,
  1415. consider the function f(x) = c*sin(x), where we want to find the best value
  1416. for the constant c.  This is nonlinear in x, of course, but it is linear in
  1417. c.  Since the fitting procedure solves for c, it has a linear equation to
  1418. solve.)  For such a linear case, the task of fitting can be performed by
  1419. comparatively simple linear algebra in one direct step.  But \fBfit\fR can do
  1420. more for you:  the parameters may be used in your function in any way you can
  1421. imagine.  To handle this more general case, however, it has to perform an
  1422. iteration, i.e. it will repeat a sequence of steps until it finds the fit to
  1423. have \&'converged\&', or until you stop it.
  1424.  
  1425. Generally, the function to be fitted will come from some kind of theory (some
  1426. prefer the term \&'model\&' here) that makes a prediction about how the data
  1427. should behave, and \fBfit\fR is then used to find the free parameters of the
  1428. theory.  This is a typical task in scientific work, where you have lots of
  1429. data that depend in more or less complicated ways on the values you\&'re
  1430. interested in.  The results will then usually be of the form \&'the measured
  1431. data can be described by the {foo} theory, for the following set of
  1432. parameters\&', and then a set of values is given, together with the errors of
  1433. your determination of these values.
  1434.  
  1435. This reasoning implies that \fBfit\fR is probably _not_ your tool of choice if
  1436. all you really want is a smooth line through your data points.  If you want
  1437. this, the \fBsmooth\fR option to \fBplot\fR is what you\&'ve been looking for, not
  1438. \fBfit\fR.  See \fBplot datafile smooth\fR for details.
  1439. .sp 2
  1440. .NH 2
  1441. Errors In Fitting
  1442. .sp 1
  1443. .LP
  1444. .XS
  1445. Errors In Fitting
  1446. .XE
  1447. One of the most important things to keep in mind when using \fBfit\fR is the
  1448. handling of errors.  Here, this term refers to the measurement errors
  1449. accompanying both your input data and resulting parameters.
  1450.  
  1451. The reason for the importance of input data errors to fitting is that
  1452. normally the single measurements aren\&'t all of the same quality, so they
  1453. shouldn\&'t have the same importance in determining the results.  That\&'s one
  1454. major reason for dividing the differences between data and function by the
  1455. input errors, also known as \&'weighting\&', in the computation of chisquared.
  1456.  
  1457. By weighting, deviations from your function at places where the data have
  1458. large errors will have a smaller part in chisquared, as the division will
  1459. make them smaller compared to the better measurements.  Another reason for
  1460. the division is that, for mathematical reasons, chisquared has to be a
  1461. dimensionless variable, i.e. chisquared should be something like \&'15.3\&', not
  1462. \&\&'15.3 square seconds\&'.
  1463.  
  1464. Without input data errors being given, all data will be weighted equally, and
  1465. the resulting errors of the parameters won\&'t have much of a real meaning.
  1466. Therefore, you should always try to find a sensible set of y-errors for your
  1467. data.  An important example is that of data representing a histogram.  In
  1468. such a case, the square root of the y value is often the correct input error
  1469. to use.
  1470.  
  1471. Once the fit iteration has stopped, it will display a load of valuable
  1472. information which you will have to learn to interpret before you can use it.
  1473. The \&'sum of squares residuals\&' is the distance between the data and your fit
  1474. function, shortly called \&'chisquared\&'.  This is what \fBfit\fR tries to minimize.
  1475. To quickly test if your fit went well, check that this is about the same as
  1476. the number of data points minus the number of parameters (all this is only
  1477. valid if you supplied y-errors, and the number of data points is large
  1478. enough).  For details on this, look up the \&'Chi-squared distribution\&' in your
  1479. favourite statistics textbook.
  1480.  
  1481. If chisquared is much larger than that, then your function didn\&'t fit the
  1482. data very well.  Try another, more general one, or allow more of the
  1483. parameters to be adjusted by \fBfit\fR.  Another possible reason could be that
  1484. the y-errors you supplied were a bit optimistic, i.e. too small.
  1485.  
  1486. If, on the other hand, chisquared is too small, then the function fit the
  1487. data _too_ well.  Either the given y-errors were too large, or the function
  1488. is too general.  You should try to restrict it by either fixing some
  1489. parameters, or just make it simpler one way or the other.
  1490.  
  1491. If all else went well, you\&'ll see a list of the resulting parameter values,
  1492. together with estimates of the errors of these values.  And you should
  1493. always be aware of this:  they\&'re _estimates_, not more.  You\&'ll have to get
  1494. used to both \fBfit\fR and kind of problems you usually apply it to before you
  1495. can use these errors for anything serious.  To start with, the errors
  1496. reported by \fBfit\fR are insensitive to the global scale of the y-errors, i.e.
  1497. if you multiply all y-errors by a constant, the resulting parameter errors
  1498. don\&'t change.
  1499.  
  1500. And, to repeat this once more: if you didn\&'t supply y-errors, the parameter
  1501. errors will normally be meaningless.
  1502.  
  1503. .sp 2
  1504. .NH 2
  1505. Tips and Tricks
  1506. .sp 1
  1507. .LP
  1508. .XS
  1509. Tips and Tricks
  1510. .XE
  1511. Here are some tips to keep in mind to get the most out of \fBfit\fR.  They\&'re not
  1512. very organized, so you\&'ll have to read them several times until their essence
  1513. has sunk in.
  1514.  
  1515. The two forms of the \fBvia\fR argument to \fBfit\fR serve two largely distinct
  1516. purposes.  The \fBvia "file"\fR form is best used for batch operation (possibly
  1517. unattended), where you just supply the startup values in a file and perhaps
  1518. later use \fBupdate\fR to copy the results back into another file (or the same
  1519. one).
  1520.  
  1521. The \fBvia var1, var2, ...\fR form is best used interactively.  Using the command
  1522. history mechanism built into gnuplot, you can easily edit the list of
  1523. parameters to be fitted or supply new startup values for the next try.  This
  1524. is particularly useful for hard problems, where a direct fit to all the
  1525. parameters at once won\&'t work, at least not without really _good_ values to
  1526. start with.  To find such a set of good starting parameters, you can iterate
  1527. several times, fitting only some of the parameters each time, until the
  1528. values are close enough to the goal that the final fit (to all the
  1529. parameters at once) will work.
  1530.  
  1531. A general word about starting values:  \fBfit\fR may, and often will, get really
  1532. badly lost in searching for the optimal parameter set if you start it way off
  1533. any possible solution.  The main reason for this is that nonlinear fitting is
  1534. not guaranteed to converge to a global optimum.  It can get stuck in a local
  1535. optimum, and there\&'s no way for the routine to find out about that.  You\&'ll
  1536. have to use your own judgement in checking whether this has happened to you
  1537. or not.
  1538.  
  1539. To partly avoid that problem, you should put all starting values at least
  1540. roughly into the vicinity of the solution.  At least the order of magnitude
  1541. should be correct, if possible.  The better your starting values are, the
  1542. less error-prone the fit.  A good way to find starting values is to draw data
  1543. and fit-function into one plot, and iterate, changing the values and
  1544. \fBreplot\fR-ting until reasonable similarity is reached.  The same plot is also
  1545. useful to check if the fit got stuck in a non-global minimum.
  1546.  
  1547. Make sure that there is no mutual dependency among parameters of the function
  1548. you are fitting.  E.g., don\&'t try to fit a*exp(x+b), because a*exp(x+b) =
  1549. a*exp(b)*exp(x).  Instead, fit either a*exp(x) or exp(x+b).
  1550.  
  1551. A technical issue:  the parameters must not be too different in magnitude.
  1552. The larger the quotient of the largest and the smallest absolute parameter
  1553. values, the slower the fit will converge.  If the quotient is close to or
  1554. above the inverse of the machine floating point precision, it may take next
  1555. to forever to converge, or refuse to converge at all.  You\&'ll have to adapt
  1556. your function to avoid this, e.g. replace \&'parameter\&' by \&'1e9*parameter\&' in
  1557. the function definition, and divide the starting value by 1e9.
  1558.  
  1559. If you can write your function as a linear combination of simple functions
  1560. weighted by the parameters to be fitted, by all means do so.  That helps a
  1561. lot, because the problem is then not nonlinear any more.  It should take only
  1562. a really small number of iterations to converge on a linear case, maybe even
  1563. only one.
  1564.  
  1565. In prescriptions for analysing data from practical experimentation courses,
  1566. you\&'ll often find descriptions how to first fit your data to some functions,
  1567. maybe in a multi-step process accounting for several aspects of the
  1568. underlying theory one by one, and then extract the data you really wanted
  1569. from the fitting parameters of that function.  With \fBfit\fR, this last step can
  1570. often be eliminated by rewriting the model function to directly use the
  1571. desired final parameters.  Transforming data can also be avoided quite often,
  1572. although sometimes at the cost of a harder fit problem.  If you think this
  1573. contradicts the previous paragraph about keeping the fit function as simple
  1574. as possible, you\&'re correct.
  1575.  
  1576. Finally, a nice quote from the manual of another fitting package (fudgit)
  1577. that kind of summarizes all these issues:  "Nonlinear fitting is an art!"
  1578. .sp 2
  1579. .RE
  1580. .br
  1581. .NH 1
  1582. Help
  1583. .sp 1
  1584. .LP
  1585. .XS
  1586. Help
  1587. .XE
  1588. The \fBhelp\fR command displays on-line help. To specify information on a
  1589. particular topic use the syntax:
  1590.  
  1591. .br
  1592.       help {<topic>}
  1593. .br
  1594.  
  1595. If <topic> is not specified, a short message is printed about \fBgnuplot\fR.
  1596. After help for the requested topic is given, a menu of subtopics is given;
  1597. help for a subtopic may be requested by typing its name, extending the help
  1598. request.  After that subtopic has been printed, the request may be extended
  1599. again or you may go back one level to the previous topic.  Eventually, the
  1600. \fBgnuplot\fR command line will return.
  1601.  
  1602. If a question mark (?) is given as the topic, the list of topics currently
  1603. available is printed on the screen.
  1604. .sp 2
  1605. .NH 1
  1606. If
  1607. .sp 1
  1608. .LP
  1609. .XS
  1610. If
  1611. .XE
  1612. The \fBif\fR command allows commands to be executed conditionally.
  1613.  
  1614. Syntax:
  1615. .br
  1616.       if (<condition>) <command-line>
  1617. .br
  1618.  
  1619. <condition> will be evaluated.  If it is true (non-zero), then the command(s)
  1620. of the <command-line> will be executed.  If <condition> is false (zero), then
  1621. the entire <command-line> is ignored.  Note that use of \fB;\fR to allow multiple
  1622. commands on the same line will _not_ end the conditionalized commands.
  1623.  
  1624. Examples:
  1625. .br
  1626.       pi=3
  1627. .br
  1628. .br
  1629.       if (pi!=acos(-1)) print "?Fixing pi!"; pi=acos(-1); print pi
  1630. .br
  1631. will display:
  1632. .br
  1633.       ?Fixing pi!
  1634. .br
  1635. .br
  1636.       3.14159265358979
  1637. .br
  1638. but
  1639. .br
  1640.       if (1==2) print "Never see this"; print "Or this either"
  1641. .br
  1642. will not display anything.
  1643.  
  1644. See \fBreread\fR for an example of how \fBif\fR and \fBreread\fR can be used together to
  1645. perform a loop.
  1646. .sp 2
  1647. .NH 1
  1648. Load
  1649. .sp 1
  1650. .LP
  1651. .XS
  1652. Load
  1653. .XE
  1654. The \fBload\fR command executes each line of the specified input file as if it
  1655. had been typed in interactively.  Files created by the \fBsave\fR command can
  1656. later be \fBload\fRed.  Any text file containing valid commands can be created
  1657. and then executed by the \fBload\fR command.  Files being \fBload\fRed may themselves
  1658. contain \fBload\fR or \fBcall\fR commands.  See \fBcomment\fR for information about
  1659. comments in commands.
  1660.  
  1661. The \fBload\fR command _must_ be the last command on a multi-command line.
  1662.  
  1663. Syntax:
  1664. .br
  1665.       load "<input-file>"
  1666. .br
  1667.  
  1668. The name of the input file must be enclosed in quotes.
  1669.  
  1670. Examples:
  1671. .br
  1672.       load 'work.gnu'
  1673. .br
  1674. .br
  1675.       load "func.dat"
  1676. .br
  1677.  
  1678. The \fBload\fR command is performed implicitly on any file names given as
  1679. arguments to \fBgnuplot\fR.  These are loaded in the order specified, and
  1680. then \fBgnuplot\fR exits.  See also \fBcall\fR.
  1681. .sp 2
  1682. .NH 1
  1683. Pause
  1684. .sp 1
  1685. .LP
  1686. .XS
  1687. Pause
  1688. .XE
  1689. The \fBpause\fR command displays any text associated with the command and then
  1690. waits a specified amount of time or until the carriage return is pressed.
  1691. \fBpause\fR is especially useful in conjunction with \fBload\fR files.
  1692.  
  1693. Syntax:
  1694. .br
  1695.       pause <time> {"<string>"}
  1696. .br
  1697.  
  1698. <time> may be any integer constant or expression.  Choosing -1 will wait
  1699. until a carriage return is hit, zero (0) won\&'t pause at all, and a positive
  1700. integer will wait the specified number of seconds.  \fBpause 0\fR is synonymous
  1701. with \fBprint\fR.
  1702.  
  1703. Note: Since \fBpause\fR communicates with the operating system rather than the
  1704. graphics, it may behave differently with different device drivers (depending
  1705. upon how text and graphics are mixed).
  1706.  
  1707. Examples:
  1708. .br
  1709.       pause -1    # Wait until a carriage return is hit
  1710. .br
  1711. .br
  1712.       pause 3     # Wait three seconds
  1713. .br
  1714. .br
  1715.       pause -1  "Hit return to continue"
  1716. .br
  1717. .br
  1718.       pause 10  "Isn't this pretty?  It's a cubic spline."
  1719. .br
  1720.  
  1721. .sp 2
  1722. .NH 1
  1723. Plot
  1724. .sp 1
  1725. .LP
  1726. .XS
  1727. Plot
  1728. .XE
  1729. \fBplot\fR is the primary command for drawing plots with \fBgnuplot\fR.  It creates
  1730. plots of functions and data in many, many ways.  \fBplot\fR is used to draw 2-d
  1731. functions and data; \fBsplot\fR draws 2-d projections of 3-d surfaces and data.
  1732. \fBplot\fR and \fBsplot\fR contain many common features; see \fBsplot\fR for differences.
  1733.  
  1734. Syntax:
  1735. .br
  1736.       plot {<ranges>}
  1737. .br
  1738. .br
  1739.            {<function> | {"<datafile>" {datafile-modifiers}}}
  1740. .br
  1741. .br
  1742.            {axes <axes>} {<title-spec>} {with <style>}
  1743. .br
  1744. .br
  1745.            {, {definitions,} <function> ...}
  1746. .br
  1747.  
  1748. where either a <function> or the name of a data file enclosed in quotes is
  1749. supplied.  A function is a mathematical expression or a pair of mathematical
  1750. expressions in parametric mode.  The expressions may be defined completely or
  1751. in part earlier in the stream of \fBgnuplot\fR commands (see \fBuser-defined\fR).
  1752.  
  1753. It is also possible to define functions and parameters on the \fBplot\fR command
  1754. itself.  This is done merely by isolating them from other items with commas.
  1755.  
  1756. There are four possible sets of axes available; the keyword <axes> is used to
  1757. select the axes for which a particular line should be scaled.  \fBx1y1\fR refers
  1758. to the axes on the bottom and left; \fBx2y2\fR to those on the top and right;
  1759. \fBx1y2\fR to those on the bottom and right; and \fBx2y1\fR to those on the top and
  1760. left.  Ranges specified on the \fBplot\fR command apply only to the first set of
  1761. axes (bottom left).
  1762.  
  1763. Examples:
  1764. .br
  1765.       plot sin(x)
  1766. .br
  1767. .br
  1768.       plot f(x) = sin(x*a), a = .2, f(x), a = .4, f(x)
  1769. .br
  1770. .br
  1771.       plot [t=1:10] [-pi:pi*2] tan(t), \\
  1772. .br
  1773. .br
  1774.            "data.1" using (tan($2)):($3/$4) smooth csplines \\
  1775. .br
  1776. .br
  1777.                     axes x1y2 notitle with lines 5
  1778. .br
  1779.  
  1780. .sp 2
  1781. .RS
  1782. .IP
  1783. .NH 2
  1784. Data-file
  1785. .sp 1
  1786. .LP
  1787. .XS
  1788. Data-file
  1789. .XE
  1790. Discrete data contained in a file can be displayed by specifying the name of
  1791. the data file (enclosed in quotes) on the \fBplot\fR or \fBsplot\fR command line.
  1792.  
  1793. Syntax:
  1794. .br
  1795.       {s}plot '<file_name>' {index <index list>}
  1796. .br
  1797. .br
  1798.                             {every <every list>}
  1799. .br
  1800. .br
  1801.                             {thru <thru expression>}
  1802. .br
  1803. .br
  1804.                             {using <using list>}
  1805. .br
  1806. .br
  1807.                             {smooth <option>}
  1808. .br
  1809.  
  1810. The modifiers \fBindex\fR, \fBevery\fR, \fBthru\fR, \fBusing\fR, and \fBsmooth\fR are discussed
  1811. separately.  In brief, \fBindex\fR selects which data sets in a multi-data-set
  1812. file are to be plotted, \fBevery\fR specifies which points within a single data
  1813. set are to be plotted, \fBusing\fR determines how the columns within a single
  1814. record are to be interpreted (\fBthru\fR is a special case of \fBusing\fR), and
  1815. \fBsmooth\fR allows for simple interpolation and approximation.
  1816.  
  1817. Data files should contain one data point per record.  Records beginning with
  1818. # (or ! on VMS) will be treated as comments and ignored.  Each data point
  1819. represents an (x,y) pair.  For \fBplot\fRs with error bars (see \fBset style
  1820. errorbars\fR), each data point is (x,y,ydelta), (x,y,ylow,yhigh), (x,y,xdelta),
  1821. (x,y,xlow,xhigh), or (x,y,xlow,xhigh,ylow,yhigh).  In all cases, the numbers
  1822. on each record of a data file must be separated by white space (one or more
  1823. blanks or tabs), unless a format specifier is provided by the \fBusing\fR option.
  1824. This white space divides each record into columns.
  1825.  
  1826. Data may be written in exponential format with the exponent preceded by the
  1827. letter e, E, d, D, q, or Q.
  1828.  
  1829. Only one column (the y value) need be provided.  If x is omitted, \fBgnuplot\fR
  1830. provides integer values starting at 0.
  1831.  
  1832. In datafiles, blank records (records with no characters other than blanks and
  1833. a newline and/or carriage return) are significant---pairs of blank records
  1834. separate \fBindex\fRes (see \fBplot datafile index\fR).  Data separated by double
  1835. blank records are treated as if they were in separate data files.
  1836.  
  1837. Single blank records designate discontinuities in a \fBplot\fR; no line will join
  1838. points separated by a blank records (if they are plotted with a line style).
  1839.  
  1840. If autoscaling has been enabled (\fBset autoscale\fR), the axes are automatically
  1841. extended to include all datapoints, with a whole number of tic marks if tics
  1842. are being drawn.  This has two consequences: i) For \fBsplot\fR, the corner of
  1843. the surface may not coincide with the corner of the base.  In this case, no
  1844. vertical line is drawn.  ii) When plotting data with the same x range on a
  1845. dual-axis graph, the x coordinates may not coincide if the x2tics are not
  1846. being drawn.  This is because the x axis has been autoextended to a whole
  1847. number of tics, but the x2 axis has not.  The following example illustrates
  1848. the problem:
  1849.  
  1850. .br
  1851.       reset; plot '-', '-'
  1852. .br
  1853. .br
  1854.       1 1
  1855. .br
  1856. .br
  1857.       19 19
  1858. .br
  1859. .br
  1860.       e
  1861. .br
  1862. .br
  1863.       1 1
  1864. .br
  1865. .br
  1866.       19 19
  1867. .br
  1868. .br
  1869.       e
  1870. .br
  1871. .sp 2
  1872. .RS
  1873. .IP
  1874. .NH 3
  1875. Every
  1876. .sp 1
  1877. .LP
  1878. .XS
  1879. Every
  1880. .XE
  1881. The \fBevery\fR keyword allows a periodic sampling of a data set to be plotted.
  1882.  
  1883. In the discussion a "point" is a datum defined by a single record in the
  1884. file.
  1885.  
  1886. Syntax:
  1887. .br
  1888.       plot 'file' every {<point_incr>}
  1889. .br
  1890. .br
  1891.                           {:{<line_incr>}
  1892. .br
  1893. .br
  1894.                             {:{<start_point>}
  1895. .br
  1896. .br
  1897.                               {:{<start_line>}
  1898. .br
  1899. .br
  1900.                                 {:{<end_point>}
  1901. .br
  1902. .br
  1903.                                   {:<end_line>}}}}}
  1904. .br
  1905.  
  1906. The data points to be plotted are selected according to a loop from
  1907. <\fBstart_point\fR> to <\fBend_point\fR> with increment <\fBpoint_incr\fR> and the
  1908. datalines according to a loop from <\fBstart_line\fR> to <\fBend_line\fR> with
  1909. increment <\fBline_incr\fR>.
  1910.  
  1911. The first datum in each dataline is numbered \&'0\&', as is the first dataline in
  1912. the file.
  1913.  
  1914. Note that records containing unplottable information are counted.
  1915.  
  1916. Any of the numbers can be omitted; the increments default to unity, the start
  1917. values to the first point or dataline, and the end values to the last point
  1918. or dataline.  If \fBevery\fR is not specified, all points in all datalines are
  1919. plotted.
  1920.  
  1921. Examples:
  1922. .br
  1923.       every :::3::3    # selects just the fourth dataline ('0' is first)
  1924. .br
  1925. .br
  1926.       every :::::9     # selects the first 10 datalines
  1927. .br
  1928. .br
  1929.       every 2:2        # selects every other point in every other dataline
  1930. .br
  1931. .br
  1932.       every ::5::15    # selects points 5 through 15 in each dataline
  1933. .br
  1934. .sp 2
  1935. .NH 3
  1936. Example datafile
  1937. .sp 1
  1938. .LP
  1939. .XS
  1940. Example datafile
  1941. .XE
  1942. This example compares the data in the file population.dat to a theoretical
  1943. curve:
  1944.  
  1945. .br
  1946.       pop(x) = 103*exp((1965-x)/10)
  1947. .br
  1948. .br
  1949.       plot [1960:1990] 'population.dat', pop(x)
  1950. .br
  1951.  
  1952. The file "population.dat" might contain:
  1953.  
  1954. .br
  1955.       # Gnu population in Antarctica since 1965
  1956. .br
  1957. .br
  1958.          1965   103
  1959. .br
  1960. .br
  1961.          1970   55
  1962. .br
  1963. .br
  1964.          1975   34
  1965. .br
  1966. .br
  1967.          1980   24
  1968. .br
  1969. .br
  1970.          1985   10
  1971. .br
  1972.  
  1973. .sp 2
  1974. .NH 3
  1975. Index
  1976. .sp 1
  1977. .LP
  1978. .XS
  1979. Index
  1980. .XE
  1981. The \fBindex\fR keyword allows only some of the data sets in a multi-data-set
  1982. file to be plotted.
  1983.  
  1984. Syntax:
  1985. .br
  1986.       plot 'file' index <m>{{:<n>}:<p>}
  1987. .br
  1988.  
  1989. Data sets are separated by pairs of blank records.  \fBindex <m>\fR selects only
  1990. set <m>; \fBindex <m>:<n>\fR selects sets in the range <m> to <n>; and \fBindex
  1991. <m>:<n>:<p>\fR selects indices <m>, <m>+<p>, <m>+2<p>, etc., but stopping at
  1992. <n>.  Following C indexing, the index 0 is assigned to the first data set in
  1993. the file.  Specifying too large an index results in an error message.  If
  1994. \fBindex\fR is not specified, all sets are plotted as a single data set.
  1995.  
  1996. Example:
  1997. .br
  1998.       plot 'file' index 4:5
  1999. .br
  2000. .sp 2
  2001. .NH 3
  2002. Smooth
  2003. .sp 1
  2004. .LP
  2005. .XS
  2006. Smooth
  2007. .XE
  2008. \fBgnuplot\fR includes a few general-purpose routines for interpolation and
  2009. approximation of data; these are grouped under the \fBsmooth\fR option.  More
  2010. sophisticated data processing may be performed by preprocessing the data
  2011. externally or by using \fBfit\fR with an appropriate model.
  2012.  
  2013. Syntax:
  2014. .br
  2015.       smooth {unique | csplines | acsplines | bezier | sbezier}
  2016. .br
  2017.  
  2018. \fBunique\fR plots the data after making them monotonic.  Each of the other
  2019. routines uses the data to determine the coefficients of a continuous curve
  2020. between the endpoints of the data.  This curve is then plotted in the same
  2021. manner as a function, that is, by finding its value at uniform intervals
  2022. along the abscissa (see \fBset samples\fR) and connecting these points with
  2023. straight line segments (if a line style is chosen).
  2024.  
  2025. If \fBautoscale\fR is in effect, the ranges will be computed such that the
  2026. plotted curve lies within the borders of the graph.
  2027.  
  2028. If too few points are available to allow the selected option to be applied,
  2029. an error message is produced.  The minimum number is one for \fBunique\fR, four
  2030. for \fBacsplines\fR, and three for the others.
  2031.  
  2032. The \fBsmooth\fR options have no effect on function plots.
  2033. .sp 2
  2034. .RS
  2035. .IP
  2036. .NH 4
  2037. Acsplines
  2038. .sp 1
  2039. .LP
  2040. .XS
  2041. Acsplines
  2042. .XE
  2043. \fBacsplines\fR approximates the data with a "natural smoothing spline".  After
  2044. the data are made monotonic in x (see \fBsmooth unique\fR), a curve is piecewise
  2045. constructed from segments of cubic polynomials whose coefficients are found
  2046. by the weighting the data points; the weights are taken from the third column
  2047. in the data file.  That default can be modified by the third entry in the
  2048. \fBusing\fR list, e.g.,
  2049. .br
  2050.       plot 'data-file' using 1:2:(1.0) smooth acsplines
  2051. .br
  2052.  
  2053. Qualitatively, the absolute magnitude of the weights determines the number
  2054. of segments used to construct the curve.  If the weights are large, the
  2055. effect of each datum is large and the curve approaches that produced by
  2056. connecting consecutive points with natural cubic splines.  If the weights are
  2057. small, the curve is composed of fewer segments and thus is smoother; the
  2058. limiting case is the single segment produced by a weighted linear least
  2059. squares fit to all the data.  The smoothing weight can be expressed in terms
  2060. of errors as a statistical weight for a point divided by a "smoothing factor"
  2061. for the curve so that (standard) errors in the file can be used as smoothing
  2062. weights.
  2063.  
  2064. Example:
  2065. .br
  2066.       sw(x,S)=1/(x*x*S)
  2067. .br
  2068. .br
  2069.       plot 'data_file' using 1:2:(sw($3,100)) smooth acsplines
  2070. .br
  2071. .sp 2
  2072. .NH 4
  2073. Bezier
  2074. .sp 1
  2075. .LP
  2076. .XS
  2077. Bezier
  2078. .XE
  2079. The \fBbezier\fR option approximates the data with a Bezier curve of degree n
  2080. (the number of data points) that connects the endpoints.
  2081. .sp 2
  2082. .NH 4
  2083. Csplines
  2084. .sp 1
  2085. .LP
  2086. .XS
  2087. Csplines
  2088. .XE
  2089. The \fBcsplines\fR option connects consecutive points by natural cubic splines
  2090. after rendering the data monotonic (see \fBsmooth unique\fR).
  2091. .sp 2
  2092. .NH 4
  2093. Sbezier
  2094. .sp 1
  2095. .LP
  2096. .XS
  2097. Sbezier
  2098. .XE
  2099. The \fBsbezier\fR option first renders the data monotonic (\fBunique\fR) and then
  2100. applies the \fBbezier\fR algorithm.
  2101. .sp 2
  2102. .NH 4
  2103. Unique
  2104. .sp 1
  2105. .LP
  2106. .XS
  2107. Unique
  2108. .XE
  2109. The \fBunique\fR option makes the data monotonic in x; points with the same
  2110. x-value are replaced by a single point having the average y-value.  The
  2111. resulting points are then connected by straight line segments.
  2112. .sp 2
  2113. .RE
  2114. .br
  2115. .NH 3
  2116. Special-filenames
  2117. .sp 1
  2118. .LP
  2119. .XS
  2120. Special-filenames
  2121. .XE
  2122. A special filename of \fB\&'-\&'\fR specifies that the data are inline; i.e., they
  2123. follow the command.  Only the data follow the command; \fBplot\fR options like
  2124. filters, titles, and line styles remain on the \&'plot\&' command line.  This is
  2125. similar to << in unix shell script, and $DECK in VMS DCL.  The data are
  2126. entered as though they are being read from a file, one data point per record.
  2127. The letter "e" at the start of the first column terminates data entry.  The
  2128. \fBusing\fR option can be applied to these data---using it to filter them through
  2129. a function might make sense, but selecting columns probably doesn\&'t!
  2130.  
  2131. \fB\&'-\&'\fR is intended for situations where it is useful to have data and commands
  2132. together, e.g., when \fBgnuplot\fR is run as a sub-process of some front-end
  2133. application.  Some of the demos, for example, might use this feature.  While
  2134. \fBplot\fR options such as \fBindex\fR and \fBevery\fR are recognized, their use forces
  2135. you to enter data that won\&'t be used.  For example, while
  2136.  
  2137. .br
  2138.       plot '-' index 0, '-' index 1
  2139. .br
  2140. .br
  2141.       2
  2142. .br
  2143. .br
  2144.       4
  2145. .br
  2146. .br
  2147.       6
  2148. .br
  2149.  
  2150.  
  2151. .br
  2152.       10
  2153. .br
  2154. .br
  2155.       12
  2156. .br
  2157. .br
  2158.       14
  2159. .br
  2160. .br
  2161.       e
  2162. .br
  2163. .br
  2164.       2
  2165. .br
  2166. .br
  2167.       4
  2168. .br
  2169. .br
  2170.       6
  2171. .br
  2172.  
  2173.  
  2174. .br
  2175.       10
  2176. .br
  2177. .br
  2178.       12
  2179. .br
  2180. .br
  2181.       14
  2182. .br
  2183. .br
  2184.       e
  2185. .br
  2186.  
  2187. does indeed work,
  2188.  
  2189. .br
  2190.       plot '-', '-'
  2191. .br
  2192. .br
  2193.       2
  2194. .br
  2195. .br
  2196.       4
  2197. .br
  2198. .br
  2199.       6
  2200. .br
  2201. .br
  2202.       e
  2203. .br
  2204. .br
  2205.       10
  2206. .br
  2207. .br
  2208.       12
  2209. .br
  2210. .br
  2211.       14
  2212. .br
  2213. .br
  2214.       e
  2215. .br
  2216.  
  2217. is a lot easier to type.
  2218.  
  2219. If you use \fB\&'-\&'\fR with \fBreplot\fR, you may need to enter the data more than once
  2220. (see \fBreplot\fR).
  2221.  
  2222. A blank filename (\&'\&') specifies that the previous filename should be reused.
  2223. This can be useful with things like
  2224.  
  2225. .br
  2226.       plot 'a/very/long/filename' using 1:2, '' using 1:3, '' using 1:4
  2227. .br
  2228.  
  2229. (If you use both \fB\&'-\&'\fR and \fB\&'\&'\fR on the same \fBplot\fR command, you\&'ll need to
  2230. have two sets of inline data, as in the example above.)
  2231.  
  2232. On some computer systems with a popen function (Unix), the datafile can be
  2233. piped through a shell command by starting the file name with a \&'<\&'.  For
  2234. example,
  2235.  
  2236. .br
  2237.       pop(x) = 103*exp(-x/10)
  2238. .br
  2239. .br
  2240.       plot "< awk '{print $1-1965, $2}' population.dat", pop(x)
  2241. .br
  2242.  
  2243. would plot the same information as the first population example but with
  2244. years since 1965 as the x axis.  If you want to execute this example, you
  2245. have to delete all comments from the data file above or substitute the
  2246. following command for the first part of the command above (the part up to
  2247. the comma):
  2248.  
  2249. .br
  2250.       plot "< awk '$0 !~ /^#/ {print $1-1965, $2}' population.dat"
  2251. .br
  2252.  
  2253. While this approach is most flexible, it is possible to achieve simple
  2254. filtering with the \fBusing\fR or \fBthru\fR keywords.
  2255. .sp 2
  2256. .NH 3
  2257. Thru
  2258. .sp 1
  2259. .LP
  2260. .XS
  2261. Thru
  2262. .XE
  2263. The \fBthru\fR function is provided for backward compatibility.
  2264.  
  2265. Syntax:
  2266. .br
  2267.       plot 'file' thru f(x)
  2268. .br
  2269.  
  2270. It is equivalent to:
  2271.  
  2272. .br
  2273.       plot 'file' using 1:(f($2))
  2274. .br
  2275.  
  2276. While the latter appears more complex, it is much more flexible.  The more
  2277. natural
  2278.  
  2279. .br
  2280.       plot 'file' thru f(y)
  2281. .br
  2282.  
  2283. also works (i.e. you can use y as the dummy variable).
  2284.  
  2285. \fBthru\fR is parsed for \fBsplot\fR and \fBfit\fR but has no effect.
  2286. .sp 2
  2287. .NH 3
  2288. Using
  2289. .sp 1
  2290. .LP
  2291. .XS
  2292. Using
  2293. .XE
  2294. The most common datafile modifier is \fBusing\fR.
  2295.  
  2296. Syntax:
  2297. .br
  2298.       plot 'file' using {<entry> {:<entry> {:<entry> ...}}} {'format'}
  2299. .br
  2300.  
  2301. If a format is specified, each datafile record is read using the C library\&'s
  2302. \&\&'scanf\&' function, with the specified format string.  Otherwise the record is
  2303. read and broken into columns at spaces or tabs.  A format cannot be specified
  2304. if time-format data is being used (this must be done by \fBset data time\fR).
  2305.  
  2306. The resulting array of data is then sorted into columns according to the
  2307. entries.  Each <entry> may be a simple column number, which selects the
  2308. datum, an expression enclosed in parentheses, or empty.  The expression can
  2309. use $1 to access the first item read, $2 for the second item, and so on.  It
  2310. can also use \fBcolumn(x)\fR and \fBvalid(x)\fR where x is an arbitrary expression
  2311. resulting in an integer.  \fBcolumn(x)\fR returns the x\&'th datum; \fBvalid(x)\fR
  2312. tests that the datum in the x\&'th column is a valid number.  A column number
  2313. of 0 generates a number increasing (from zero) with each point, and is reset
  2314. upon encountering two blank records.  A column number of -1 gives the
  2315. dataline number, which starts at 0, increments at single blank records, and
  2316. is reset at double blank records.  A column number of -2 gives the index
  2317. number, which is incremented only when two blank records are found.  An empty
  2318. <entry> will default to its order in the list of entries.  For example,
  2319. \fBusing ::4\fR is interpreted as \fBusing 1:2:4\fR.
  2320.  
  2321. N.B.---the \fBcall\fR command also uses $\&'s as a special character.  See \fBcall\fR
  2322. for details about how to include a column number in a \fBcall\fR argument list.
  2323.  
  2324. If the \fBusing\fR list has but a single entry, that <entry> will be used for y
  2325. and the data point number is used for x; for example, "\fBplot \&'file\&' using 1\fR"
  2326. is identical to "\fBplot \&'file\&' using 0:1\fR".  If the \fBusing\fR list has two
  2327. entries, these will be used for x and y.  Additional entries are usually
  2328. errors in x and/or y.  See \fBset style\fR for details about plotting styles that
  2329. make use of error information, and \fBfit\fR for use of error information in
  2330. curve fitting.
  2331.  
  2332. \&\&'scanf\&' accepts several numerical specifications but \fBgnuplot\fR requires all
  2333. inputs to be double-precision floating-point variables, so \fBlf\fR is the only
  2334. permissible specifier.  \&'scanf\&' expects to see white space---a blank, tab
  2335. ("\\t"), newline ("\\n"), or formfeed ("\\f")---between numbers; anything else
  2336. in the input stream must be explicitly skipped.
  2337.  
  2338. Note that the use of "\\t", "\\n", or "\\f" or requires use of double-quotes
  2339. rather than single-quotes.
  2340.  
  2341. Examples:
  2342.  
  2343. This creates a plot of the sum of the 2nd and 3rd data against the first:
  2344. (The format string specifies comma- rather than space-separated columns.)
  2345. .br
  2346.       plot 'file' using 1:($2+$3) '%lf,%lf,%lf'
  2347. .br
  2348.  
  2349. In this example the data are read from the file "MyData" using a more
  2350. complicated format:
  2351. .br
  2352.       plot "MyData" using "%*lf%lf%*20[^\\n]%lf"
  2353. .br
  2354.  
  2355. The meaning of this format is:
  2356.  
  2357. .br
  2358.       %*lf        ignore a number
  2359. .br
  2360. .br
  2361.       %lf         read a double-precision number (x by default)
  2362. .br
  2363. .br
  2364.       %*20[^\\n]   ignore 20 non-newline characters
  2365. .br
  2366. .br
  2367.       %lf         read a double-precision number (y by default)
  2368. .br
  2369.  
  2370. One trick is to use the ternary \fB?:\fR operator to filter data:
  2371.  
  2372. .br
  2373.       plot 'file' using 1:($3>10 ? $2 : 1/0)
  2374. .br
  2375.  
  2376. which plots the datum in column two against that in column one provided
  2377. the datum in column three exceeds ten.  \fB1/0\fR is undefined; \fBgnuplot\fR
  2378. quietly ignores undefined points, so unsuitable points are suppressed.
  2379.  
  2380. In fact, you can use a constant expression for the column number, provided it
  2381. doesn\&'t start with an opening parenthesis; constructs like \fBusing
  2382. 0+(complicated expression)\fR can be used.  The crucial point is that the
  2383. expression is evaluated once if it doesn\&'t start with a left parenthesis, or
  2384. once for each data point read if it does.
  2385.  
  2386. If timeseries data are being used, the time can span multiple columns.  The
  2387. starting column should be specified.  Note that the spaces within the time
  2388. must be included when calculating starting columns for other data.  E.g., if
  2389. the first element on a line is a time with an embedded space, the y value
  2390. should be specified as column three.
  2391.  
  2392. It should be noted that \fBplot \&'file\&'\fR, \fBplot \&'file\&' using 1:2\fR, and \fBplot
  2393. \&\&'file\&' using ($1):($2)\fR can be subtly different: 1) if \fBfile\fR has some lines
  2394. with one column and some with two, the first will invent x values when they
  2395. are missing, the second will quietly ignore the lines with one column, and
  2396. the third will store an undefined value for lines with one point (so that in
  2397. a plot with lines, no line joins points across the bad point); 2) if a line
  2398. contains text at the first column, the first will abort the plot on an error,
  2399. but the second and third should quietly skip the garbage.
  2400.  
  2401. In fact, it is often possible to plot a file with lots of lines of garbage at
  2402. the top simply by specifying
  2403.  
  2404. .br
  2405.       plot 'file' using 1:2
  2406. .br
  2407.  
  2408. If you want to leave text in your data files, it is always safe to put the
  2409. comment character (#) in the first column of the text lines.
  2410. .sp 2
  2411. .RE
  2412. .br
  2413. .NH 2
  2414. Errorbars
  2415. .sp 1
  2416. .LP
  2417. .XS
  2418. Errorbars
  2419. .XE
  2420. Error bars are supported for 2-d data file plots by reading one to four
  2421. additional columns (or \fBusing\fR entries); these additional values are used in
  2422. different ways by the various errorbar styles.
  2423.  
  2424. In the default situation, \fBgnuplot\fR expects to see three, four, or six
  2425. numbers on each line of the data file---either
  2426.  
  2427. .br
  2428.       (x, y, ydelta),
  2429. .br
  2430. .br
  2431.       (x, y, ylow, yhigh),
  2432. .br
  2433. .br
  2434.       (x, y, xdelta),
  2435. .br
  2436. .br
  2437.       (x, y, xlow, xhigh),
  2438. .br
  2439. .br
  2440.       (x, y, xdelta, ydelta), or
  2441. .br
  2442. .br
  2443.       (x, y, xlow, xhigh, ylow, yhigh).
  2444. .br
  2445.  
  2446. The x coordinate must be specified.  The order of the numbers must be
  2447. exactly as given above, though the \fBusing\fR qualifier can manipulate the order
  2448. and provide values for missing columns.  For example,
  2449.  
  2450. .br
  2451.       plot 'file' with errorbars
  2452. .br
  2453. .br
  2454.       plot 'file' using 1:2:(sqrt($1)) with xerrorbars
  2455. .br
  2456. .br
  2457.       plot 'file' using 1:2:($1-$3):($1+$3):4:5 with xyerrorbars
  2458. .br
  2459.  
  2460. The last example is for a file containing an unsupported combination of
  2461. relative x and absolute y errors.  The \fBusing\fR entry generates absolute x min
  2462. and max from the relative error.
  2463.  
  2464. The y error bar is a vertical line plotted from (x, ylow) to (x, yhigh).
  2465. If ydelta is specified instead of ylow and yhigh, ylow = y - ydelta and
  2466. yhigh = y + ydelta are derived.  If there are only two numbers on the record,
  2467. yhigh and ylow are both set to y.  The x error bar is a horizontal line
  2468. computed in the same fashion.  To get lines plotted between the data points,
  2469. \fBplot\fR the data file twice, once with errorbars and once with lines (but
  2470. remember to use the \fBnotitle\fR option on one to avoid two entries in the key).
  2471.  
  2472. The error bars have crossbars at each end unless \fBset bar\fR is used (see \fBset
  2473. bar\fR for details).
  2474.  
  2475. If autoscaling is on, the ranges will be adjusted to include the error bars.
  2476.  
  2477. See \fBplot using\fR, \fBplot with\fR, and \fBset style\fR for more information.
  2478. .sp 2
  2479. .NH 2
  2480. Parametric
  2481. .sp 1
  2482. .LP
  2483. .XS
  2484. Parametric
  2485. .XE
  2486. When in parametric mode (\fBset parametric\fR) mathematical expressions must be
  2487. given in pairs for \fBplot\fR and in triplets for \fBsplot\fR.
  2488.  
  2489. Examples:
  2490. .br
  2491.       plot sin(t),t**2
  2492. .br
  2493. .br
  2494.       splot cos(u)*cos(v),cos(u)*sin(v),sin(u)
  2495. .br
  2496.  
  2497. Data files are plotted as before, except any preceding parametric function
  2498. must be fully specified before a data file is given as a plot.  In other
  2499. words, the x parametric function (\fBsin(t)\fR above) and the y parametric
  2500. function (\fBt**2\fR above) must not be interrupted with any modifiers or data
  2501. functions; doing so will generate a syntax error stating that the parametric
  2502. function is not fully specified.
  2503.  
  2504. Other modifiers, such as \fBwith\fR and \fBtitle\fR, may be specified only after the
  2505. parametric function has been completed:
  2506.  
  2507. .br
  2508.       plot sin(t),t**2 title 'Parametric example' with linespoints
  2509. .br
  2510. .sp 2
  2511. .NH 2
  2512. Ranges
  2513. .sp 1
  2514. .LP
  2515. .XS
  2516. Ranges
  2517. .XE
  2518. The optional ranges specify the region of the graph that will be displayed.
  2519.  
  2520. Syntax:
  2521. .br
  2522.       [{<dummy-var>=}{{<min>}:{<max>}}]
  2523. .br
  2524. .br
  2525.       [{{<min>}:{<max>}}]
  2526. .br
  2527.  
  2528. The first form applies to the independent variable (\fBxrange\fR or \fBtrange\fR, if
  2529. in parametric mode).  The second form applies to the dependent variable
  2530. \fByrange\fR (and \fBxrange\fR, too, if in parametric mode).  <dummy-var> is a new
  2531. name for the independent variable.  (The defaults may be changed with \fBset
  2532. dummy\fR.)  The optional <min> and <max> terms can be constant expressions or *.
  2533.  
  2534. In non-parametric mode, the order in which ranges must be given is \fBxrange\fR
  2535. and \fByrange\fR.
  2536.  
  2537. In parametric mode, the order for the \fBplot\fR command is \fBtrange\fR, \fBxrange\fR,
  2538. and \fByrange\fR.  The following \fBplot\fR command shows setting the \fBtrange\fR to
  2539. [-pi:pi], the \fBxrange\fR to [-1.3:1.3] and the \fByrange\fR to [-1:1] for the
  2540. duration of the graph:
  2541.  
  2542. .br
  2543.       plot [-pi:pi] [-1.3:1.3] [-1:1] sin(t),t**2
  2544. .br
  2545.  
  2546. Note that the x2range and y2range cannot be specified here---\fBset x2range\fR
  2547. and \fBset y2range\fR must be used.
  2548.  
  2549. Ranges are interpreted in the order listed above for the appropriate mode.
  2550. Once all those needed are specified, no further ones must be listed, but
  2551. unneeded ones cannot be skipped---use an empty range \fB[]\fR as a placeholder.
  2552.  
  2553. \fB*\fR can be used to allow autoscaling of either of min and max.  See also
  2554. \fBset autoscale\fR.
  2555.  
  2556. Ranges specified on the \fBplot\fR or \fBsplot\fR command line affect only that
  2557. graph; use the \fBset xrange\fR, \fBset yrange\fR, etc., commands to change the
  2558. default ranges for future graphs.
  2559.  
  2560. With time data, you must provide the range (in the same manner as the time
  2561. appears in the datafile) within quotes.  \fBgnuplot\fR uses the \fBtimefmt\fR string
  2562. to read the value---see \fBset timefmt\fR.
  2563.  
  2564. Examples:
  2565.  
  2566. This uses the current ranges:
  2567. .br
  2568.       plot cos(x)
  2569. .br
  2570.  
  2571. This sets the x range only:
  2572. .br
  2573.       plot [-10:30] sin(pi*x)/(pi*x)
  2574. .br
  2575.  
  2576. This is the same, but uses t as the dummy-variable:
  2577. .br
  2578.       plot [t = -10 :30]  sin(pi*t)/(pi*t)
  2579. .br
  2580.  
  2581. This sets both the x and y ranges:
  2582. .br
  2583.       plot [-pi:pi] [-3:3]  tan(x), 1/x
  2584. .br
  2585.  
  2586. This sets only the y range, and turns off autoscaling on both axes:
  2587. .br
  2588.       plot [ ] [-2:sin(5)*-8] sin(x)**besj0(x)
  2589. .br
  2590.  
  2591. This sets xmax and ymin only:
  2592. .br
  2593.       plot [:200] [-pi:]  exp(sin(x))
  2594. .br
  2595.  
  2596. This sets the x range for a timeseries:
  2597. .br
  2598.       set timefmt "%d/%m/%y %H:%M"
  2599. .br
  2600. .br
  2601.       plot ["1/6/93 12:00":"5/6/93 12:00"] 'timedata.dat'
  2602. .br
  2603.  
  2604. .sp 2
  2605. .NH 2
  2606. Title
  2607. .sp 1
  2608. .LP
  2609. .XS
  2610. Title
  2611. .XE
  2612. A line title for each function and data set appears in the key, accompanied
  2613. by a sample of the line and/or symbol used to represent it.  It can be
  2614. changed by using the \fBtitle\fR option.
  2615.  
  2616. Syntax:
  2617. .br
  2618.       title "<title>" | notitle
  2619. .br
  2620.  
  2621. where <title> is the new title of the line and must be enclosed in quotes.
  2622. The quotes will not be shown in the key.  A special character may be given as
  2623. a backslash followed by its octal value ("\\345").  The tab character "\\t" is
  2624. understood.  Note that backslash processing occurs only for strings enclosed
  2625. in double quotes---use single quotes to prevent such processing.  The newline
  2626. character "\\n" is not processed in key entries in either type of string.
  2627.  
  2628. The line title and sample can be omitted from the key by using the keyword
  2629. \fBnotitle\fR.  A null title (\fBtitle \&'\&'\fR) is equivalent to \fBnotitle\fR.  If only
  2630. the sample is wanted, use one or more blanks (\fBtitle \&' \&'\fR).
  2631.  
  2632. By default the line title is the function or file name as it appears on the
  2633. \fBplot\fR command.  If it is a file name, any datafile modifiers specified will
  2634. be included in the default title.
  2635.  
  2636. The layout of the key itself (position, title justification, etc.) can be
  2637. controlled by \fBset key\fR.  Please see \fBset key\fR for details.
  2638.  
  2639. Examples:
  2640.  
  2641. This plots y=x with the title \&'x\&':
  2642. .br
  2643.       plot x
  2644. .br
  2645.  
  2646. This plots x squared with title "x^2" and "data.1" with title \&'measured
  2647. data\&':
  2648. .br
  2649.       plot x**2 title "x^2", "data.1" t 'measured data'
  2650. .br
  2651.  
  2652. This puts an untitled circular border around a polar graph:
  2653. .br
  2654.       set polar; plot my_function(t), 1 notitle
  2655. .br
  2656. .sp 2
  2657. .NH 2
  2658. With
  2659. .sp 1
  2660. .LP
  2661. .XS
  2662. With
  2663. .XE
  2664. Functions and data may be displayed in one of a large number of styles.
  2665. The \fBwith\fR keyword provides the means of selection.
  2666.  
  2667. Syntax:
  2668. .br
  2669.       with <style> { {linestyle | ls <line_style>}
  2670. .br
  2671. .br
  2672.                      | {{linetype | lt <line_type>}
  2673. .br
  2674. .br
  2675.                         {linewidth | lw <line_width>}
  2676. .br
  2677. .br
  2678.                         {pointtype | pt <point_type>}
  2679. .br
  2680. .br
  2681.                         {pointsize | ps <point_size>}} }
  2682. .br
  2683.  
  2684. where <style> is either \fBlines\fR, \fBpoints\fR, \fBlinespoints\fR, \fBimpulses\fR, \fBdots\fR,
  2685. \fBsteps\fR, \fBfsteps\fR, \fBhisteps\fR, \fBerrorbars\fR, \fBxerrorbars\fR, \fByerrorbars\fR,
  2686. \fBxyerrorbars\fR, \fBboxes\fR, \fBboxerrorbars\fR, \fBboxxyerrorbars\fR, \fBfinancebars\fR,
  2687. \fBcandlesticks\fR or \fBvector\fR.  Some of these styles require additional
  2688. information.  See \fBset style <style>\fR for details of each style.
  2689.  
  2690. Default styles are chosen with the \fBset function style\fR and \fBset data style\fR
  2691. commands.
  2692.  
  2693. By default, each function and data file will use a different line type and
  2694. point type, up to the maximum number of available types.  All terminal
  2695. drivers support at least six different point types, and re-use them, in
  2696. order, if more are required.  The LaTeX driver supplies an additional six
  2697. point types (all variants of a circle), and thus will only repeat after 12
  2698. curves are plotted with points.  The PostScript drivers (\fBpostscript\fR)
  2699. supplies a total of 64.
  2700.  
  2701. If you wish to choose the line or point type for a single plot, <line_type>
  2702. and <point_type> may be specified.  These are positive integer constants (or
  2703. expressions) that specify the line type and point type to be used for the
  2704. plot.  Use \fBtest\fR to display the types available for your terminal.
  2705.  
  2706. You may also scale the line width and point size for a plot by using
  2707. <line_width> and <point_size>, which are specified relative to the default
  2708. values for each terminal.  The pointsize may also be altered globally---see
  2709. \fBset pointsize\fR for details.  But note that both <point_size> as set here and
  2710. as set by \fBset pointsize\fR multiply the default point size---their effects are
  2711. not cumulative.  That is, \fBset pointsize 2; plot x w p ps 3\fR will use points
  2712. three times default size, not six.
  2713.  
  2714. If you have defined specific line type/width and point type/size combinations
  2715. with \fBset linestyle\fR, one of these may be selected by setting <line_style> to
  2716. the index of the desired style.
  2717.  
  2718. The keywords may be abbreviated as indicated.
  2719.  
  2720. Note that the linewidth and pointsize options are not supported by all
  2721. terminals.
  2722.  
  2723. Examples:
  2724.  
  2725. This plots sin(x) with impulses:
  2726. .br
  2727.       plot sin(x) with impulses
  2728. .br
  2729.  
  2730. This plots x with points, x**2 with the default:
  2731. .br
  2732.       plot x*y w points, x**2 + y**2
  2733. .br
  2734.  
  2735. This plots tan(x) with the default function style, "data.1" with lines:
  2736. .br
  2737.       plot [ ] [-2:5] tan(x), "data.1" with l
  2738. .br
  2739.  
  2740. This plots "leastsq.dat" with impulses:
  2741. .br
  2742.       plot 'leastsq.dat' w i
  2743. .br
  2744.  
  2745. This plots the data file \&'population\&' with boxes:
  2746. .br
  2747.       plot "population" with boxes
  2748. .br
  2749.  
  2750. This plots "exper.dat" with errorbars and lines connecting the points
  2751. (\&'exper.dat\&' should have three or four data columns):
  2752. .br
  2753.       plot 'exper.dat' w lines, 'exper.dat' notitle w errorbars
  2754. .br
  2755.  
  2756. This plots sin(x) and cos(x) with linespoints, using the same line type but
  2757. different point types:
  2758. .br
  2759.       plot sin(x) with linesp lt 1 pt 3, cos(x) with linesp lt 1 pt 4
  2760. .br
  2761.  
  2762. This plots file "data" with points of type 3 and twice usual size:
  2763. .br
  2764.       plot "data" with points pointtype 3 pointsize 2
  2765. .br
  2766.  
  2767. This plots two data sets with lines differing only by weight:
  2768. .br
  2769.       plot "d1" t "good" w l lt 2 lw 3, "d2" t "bad" w l lt 2 lw 1
  2770. .br
  2771.  
  2772. See \fBset style\fR to change the default styles.
  2773. .sp 2
  2774. .RE
  2775. .br
  2776. .NH 1
  2777. Print
  2778. .sp 1
  2779. .LP
  2780. .XS
  2781. Print
  2782. .XE
  2783. The \fBprint\fR command prints the value of <expression> to the screen.  It is
  2784. synonymous with \fBpause 0\fR.  <expression> may be anything that \fBgnuplot\fR can
  2785. evaluate that produces a number, or it can be a string.
  2786.  
  2787. Syntax:
  2788. .br
  2789.       print <expression> {, <expression>, ...}
  2790. .br
  2791.  
  2792. See \fBexpressions\fR.
  2793. .sp 2
  2794. .NH 1
  2795. Pwd
  2796. .sp 1
  2797. .LP
  2798. .XS
  2799. Pwd
  2800. .XE
  2801. The \fBpwd\fR command prints the name of the working directory to the screen.
  2802. .sp 2
  2803. .NH 1
  2804. Quit
  2805. .sp 1
  2806. .LP
  2807. .XS
  2808. Quit
  2809. .XE
  2810. The \fBexit\fR and \fBquit\fR commands and END-OF-FILE character will exit \fBgnuplot\fR.
  2811. Each of these commands will clear the output device (as does the \fBclear\fR
  2812. command) before exiting.
  2813. .sp 2
  2814. .NH 1
  2815. Replot
  2816. .sp 1
  2817. .LP
  2818. .XS
  2819. Replot
  2820. .XE
  2821. The \fBreplot\fR command without arguments repeats the last \fBplot\fR or \fBsplot\fR
  2822. command.  This can be useful for viewing a plot with different \fBset\fR options,
  2823. or when generating the same plot for several devices.
  2824.  
  2825. Arguments specified after a \fBreplot\fR command will be added onto the last
  2826. \fBplot\fR or \fBsplot\fR command (with an implied \&',\&' separator) before it is
  2827. repeated.  \fBreplot\fR accepts the same arguments as the \fBplot\fR and \fBsplot\fR
  2828. commands except that ranges cannot be specified.  Thus you can use \fBreplot\fR
  2829. to plot a function against the second axes if the previous command was \fBplot\fR
  2830. but not if it was \fBsplot\fR, and similarly you can use \fBreplot\fR to add a plot
  2831. from a binary file only if the previous command was \fBsplot\fR.
  2832.  
  2833. N.B.---use of
  2834.  
  2835. .br
  2836.       plot '-' ; ... ; replot
  2837. .br
  2838.  
  2839. is not recommended.  \fBgnuplot\fR does not store the inline data internally, so
  2840. since \fBreplot\fR appends new information to the previous \fBplot\fR and then
  2841. executes the modified command, the \fB\&'-\&'\fR from the initial \fBplot\fR will expect
  2842. to read inline data again.
  2843.  
  2844. Note that \fBreplot\fR does not work in \fBmultiplot\fR mode, since it reproduces
  2845. only the last plot rather than the entire screen.
  2846.  
  2847. See also \fBcommand-line-editing\fR for ways to edit the last \fBplot\fR (\fBsplot\fR)
  2848. command.
  2849. .sp 2
  2850. .NH 1
  2851. Reread
  2852. .sp 1
  2853. .LP
  2854. .XS
  2855. Reread
  2856. .XE
  2857. The \fBreread\fR command causes the current \fBgnuplot\fR command file, as specified
  2858. by a \fBload\fR command or on the command line, to be reset to its starting
  2859. point before further commands are read from it.  This essentially implements
  2860. an endless loop of the commands from the beginning of the command file to
  2861. the \fBreread\fR command.  (But this is not necessarily a disaster---\fBreread\fR can
  2862. be very useful when used in conjunction with \fBif\fR.  See \fBif\fR for details.)
  2863. The \fBreread\fR command has no effect if input from standard input.
  2864.  
  2865. Examples:
  2866.  
  2867. Suppose the file "looper" contains the commands
  2868. .br
  2869.       a=a+1
  2870. .br
  2871. .br
  2872.       plot sin(x*a)
  2873. .br
  2874. .br
  2875.       pause -1
  2876. .br
  2877. .br
  2878.       if(a<5) reread
  2879. .br
  2880. and from within \fBgnuplot\fR you submit the commands
  2881. .br
  2882.       a=0
  2883. .br
  2884. .br
  2885.       load 'looper'
  2886. .br
  2887. The result will be four plots (separated by the \fBpause\fR message).
  2888.  
  2889. Suppose the file "data" contains six columns of numbers with a total yrange
  2890. from 0 to 10; the first is x and the next are five different functions of x.
  2891. Suppose also that the file "plotter" contains the commands
  2892. .br
  2893.       c_p = c_p+1
  2894. .br
  2895. .br
  2896.       plot "$0" using 1:c_p with lines linetype c_p
  2897. .br
  2898. .br
  2899.       if(c_p <  n_p) reread
  2900. .br
  2901. and from within \fBgnuplot\fR you submit the commands
  2902. .br
  2903.       n_p=6
  2904. .br
  2905. .br
  2906.       c_p=1
  2907. .br
  2908. .br
  2909.       set nokey
  2910. .br
  2911. .br
  2912.       set yrange [0:10]
  2913. .br
  2914. .br
  2915.       set multiplot
  2916. .br
  2917. .br
  2918.       call 'plotter' 'data'
  2919. .br
  2920. .br
  2921.       set nomultiplot
  2922. .br
  2923. The result is a single graph consisting of five plots.  The yrange must be
  2924. set explicitly to guarantee that the five separate graphs (drawn on top of
  2925. each other in multiplot mode) will have exactly the same axes.  The linetype
  2926. must be specified; otherwise all the plots would be drawn with the same type.
  2927. .sp 2
  2928. .NH 1
  2929. Reset
  2930. .sp 1
  2931. .LP
  2932. .XS
  2933. Reset
  2934. .XE
  2935. The \fBreset\fR command causes all options that can be set with the \fBset\fR
  2936. command to take on their default values.  The only exceptions are that the
  2937. terminal set with \fBset term\fR and the output file set with \fBset output\fR are
  2938. left unchanged.  This command is useful, e.g., to restore the default
  2939. settings at the end of a command file, or to return to a defined state after
  2940. lots of settings have been changed within a command file.  Please refer to
  2941. the \fBset\fR command to see the default values that the various options take.
  2942. .sp 2
  2943. .NH 1
  2944. Save
  2945. .sp 1
  2946. .LP
  2947. .XS
  2948. Save
  2949. .XE
  2950. The \fBsave\fR command saves user-defined functions, variables, \fBset\fR options,
  2951. or all three, plus the last \fBplot\fR (\fBsplot\fR) command to the specified file.
  2952.  
  2953. Syntax:
  2954. .br
  2955.       save  {<option>} "<filename>"
  2956. .br
  2957.  
  2958. where <option> is \fBfunctions\fR, \fBvariables\fR or \fBset\fR. If no option is used,
  2959. \fBgnuplot\fR saves functions, variables, \fBset\fR options and the last \fBplot\fR
  2960. (\fBsplot\fR) command.
  2961.  
  2962. \fBsave\fRd files are written in text format and may be read by the \fBload\fR
  2963. command.
  2964.  
  2965. The filename must be enclosed in quotes.
  2966.  
  2967. Examples:
  2968. .br
  2969.       save "work.gnu"
  2970. .br
  2971. .br
  2972.       save functions 'func.dat'
  2973. .br
  2974. .br
  2975.       save var 'var.dat'
  2976. .br
  2977. .br
  2978.       save set "options.dat"
  2979. .br
  2980. .sp 2
  2981. .NH 1
  2982. Set-show
  2983. .sp 1
  2984. .LP
  2985. .XS
  2986. Set-show
  2987. .XE
  2988. The \fBset\fR command sets _lots_ of options.  No screen is drawn, however, until
  2989. a \fBplot\fR, \fBsplot\fR, or \fBreplot\fR command is given.
  2990.  
  2991. The \fBshow\fR command shows their settings.  \fBshow all\fR shows all the
  2992. settings.
  2993.  
  2994. If a variable contains time/date data, \fBshow\fR will display it according to
  2995. the format currently defined by \fBset timefmt\fR, even if that was not in effect
  2996. when the variable was initially defined.
  2997. .sp 2
  2998. .RS
  2999. .IP
  3000. .NH 2
  3001. Angles
  3002. .sp 1
  3003. .LP
  3004. .XS
  3005. Angles
  3006. .XE
  3007. By default, \fBgnuplot\fR assumes the independent variable in polar graphs is in
  3008. units of radians.  If \fBset angles degrees\fR is specified before \fBset polar\fR,
  3009. then the default range is [0:360] and the independent variable has units of
  3010. degrees.  This is particularly useful for plots of data files.  The angle
  3011. setting also applies to 3-d mapping as set via the \fBset mapping\fR command.
  3012.  
  3013. Syntax:
  3014. .br
  3015.       set angles {degrees | radians}
  3016. .br
  3017. .br
  3018.       show angles
  3019. .br
  3020.  
  3021. The angle specified in \fBset grid polar\fR is also read and displayed in the
  3022. units specified by \fBset angles\fR.
  3023.  
  3024. \fBset angles\fR also affects the arguments of the machine-defined functions
  3025. sin(x), cos(x) and tan(x), and the outputs of asin(x), acos(x), atan(x),
  3026. atan2(x), and arg(x).  It has no effect on the arguments of hyperbolic
  3027. functions or Bessel functions.  Note that the output of inverse hyperbolic
  3028. functions of complex arguments are effected, however; if these functions are
  3029. used, \fBset angles radians\fR must be in effect:
  3030.  
  3031. .br
  3032.       x={1.0,0.1}
  3033. .br
  3034. .br
  3035.       set angles radians
  3036. .br
  3037. .br
  3038.       y=sinh(x)
  3039. .br
  3040. .br
  3041.       print y         #prints {1.16933, 0.154051}
  3042. .br
  3043. .br
  3044.       print asinh(y)  #prints {1.0, 0.1}
  3045. .br
  3046. but
  3047. .br
  3048.       set angles degrees
  3049. .br
  3050. .br
  3051.       y=sinh(x)
  3052. .br
  3053. .br
  3054.       print y         #prints {1.16933, 0.154051}
  3055. .br
  3056. .br
  3057.       print asinh(y)  #prints {57.29578, 5.729578}
  3058. .br
  3059. .sp 2
  3060. .NH 2
  3061. Arrow
  3062. .sp 1
  3063. .LP
  3064. .XS
  3065. Arrow
  3066. .XE
  3067. Arbitrary arrows can be placed on a plot using the \fBset arrow\fR command.
  3068.  
  3069. Syntax:
  3070. .br
  3071.       set arrow {<tag>} {from <position>} {to <position>} {{no}head}
  3072. .br
  3073. .br
  3074.                 { {linestyle | ls <line_style>}
  3075. .br
  3076. .br
  3077.                   | {linetype | lt <line_type>}
  3078. .br
  3079. .br
  3080.                     {linewidth | lw <line_width} }
  3081. .br
  3082. .br
  3083.       set noarrow {<tag>}
  3084. .br
  3085. .br
  3086.       show arrow
  3087. .br
  3088.  
  3089. <tag> is an integer that identifies the arrow.  If no tag is given, the
  3090. lowest unused tag value is assigned automatically.  The tag can be used to
  3091. delete or change a specific arrow.  To change any attribute of an existing
  3092. arrow, use the \fBset arrow\fR command with the appropriate tag and specify the
  3093. parts of the arrow to be changed.
  3094.  
  3095. The <position>s are specified by either x,y or x,y,z, and may be preceded by
  3096. \fBfirst\fR, \fBsecond\fR, \fBgraph\fR, or \fBscreen\fR to select the coordinate system.
  3097. Unspecified coordinates default to 0.  The endpoints can be specified in
  3098. one of four coordinate systems---\fBfirst\fR or \fBsecond\fR axes, \fBgraph\fR or
  3099. \fBscreen\fR.  See \fBcoordinates\fR for details.  A coordinate system specifier
  3100. does not carry over from the "from" position to the "to" position.  Arrows
  3101. outside the screen boundaries are permitted but may cause device errors.
  3102.  
  3103. Specifying \fBnohead\fR produces an arrow drawn without a head---a line segment.
  3104. This gives you yet another way to draw a line segment on the plot.  By
  3105. default, arrows have heads.
  3106.  
  3107. The line style may be selected from a user-defined list of line styles (see
  3108. \fBset linestyle\fR) or may be defined here by providing values for <line_type>
  3109. (an index from the default list of styles) and/or <line_width> (which is a
  3110. multiplier for the default width).
  3111.  
  3112. Note, however, that if a user-defined line style has been selected, its
  3113. properties (type and width) cannot be altered merely by issuing another
  3114. \fBset arrow\fR command with the appropriate index and \fBlt\fR or \fBlw\fR.
  3115.  
  3116. Examples:
  3117.  
  3118. To set an arrow pointing from the origin to (1,2) with user-defined style 5,
  3119. use:
  3120. .br
  3121.       set arrow to 1,2 ls 5
  3122. .br
  3123.  
  3124. To set an arrow from bottom left of plotting area to (-5,5,3), and tag the
  3125. arrow number 3, use:
  3126. .br
  3127.       set arrow 3 from graph 0,0 to -5,5,3
  3128. .br
  3129.  
  3130. To change the preceding arrow to end at 1,1,1, without an arrow head and
  3131. double its width, use:
  3132. .br
  3133.       set arrow 3 to 1,1,1 nohead lw 2
  3134. .br
  3135.  
  3136. To draw a vertical line from the bottom to the top of the graph at x=3, use:
  3137. .br
  3138.       set arrow from 3, graph 0 to 3, graph 1 nohead
  3139. .br
  3140.  
  3141. To delete arrow number 2, use:
  3142. .br
  3143.       set noarrow 2
  3144. .br
  3145.  
  3146. To delete all arrows, use:
  3147. .br
  3148.       set noarrow
  3149. .br
  3150.  
  3151. To show all arrows (in tag order), use:
  3152. .br
  3153.       show arrow
  3154. .br
  3155. .sp 2
  3156. .NH 2
  3157. Autoscale
  3158. .sp 1
  3159. .LP
  3160. .XS
  3161. Autoscale
  3162. .XE
  3163. Autoscaling may be set individually on the x, y or z axis or globally on all
  3164. axes. The default is to autoscale all axes.
  3165.  
  3166. Syntax:
  3167. .br
  3168.       set autoscale {<axes>{min|max}}
  3169. .br
  3170. .br
  3171.       set noautoscale {<axes>{min|max}}
  3172. .br
  3173. .br
  3174.       show autoscale
  3175. .br
  3176.  
  3177. where <axes> is either \fBx\fR, \fBy\fR, \fBz\fR, \fBx2\fR, \fBy2\fR or \fBxy\fR.  A keyword with
  3178. \fBmin\fR or \fBmax\fR appended (this cannot be done with \fBxy\fR) tells \fBgnuplot\fR to
  3179. autoscale just the minimum or maximum of that axis.  If no keyword is given,
  3180. all axes are autoscaled.
  3181.  
  3182. When autoscaling, the axis range is automatically computed and the dependent
  3183. axis (y for a \fBplot\fR and z for \fBsplot\fR) is scaled to include the range of the
  3184. function or data being plotted.
  3185.  
  3186. If autoscaling of the dependent axis (y or z) is not set, the current y or z
  3187. range is used.
  3188.  
  3189. Autoscaling the independent variables (x for \fBplot\fR and x,y for \fBsplot\fR) is a
  3190. request to set the domain to match any data file being plotted.  If there are
  3191. no data files, autoscaling an independent variable has no effect.  In other
  3192. words, in the absence of a data file, functions alone do not affect the x
  3193. range (or the y range if plotting z = f(x,y)).
  3194.  
  3195. Please see \fBset xrange\fR for additional information about ranges.
  3196.  
  3197. The behavior of autoscaling remains consistent in parametric mode, (see \fBset
  3198. parametric\fR).  However, there are more dependent variables and hence more
  3199. control over x, y, and z axis scales.  In parametric mode, the independent or
  3200. dummy variable is t for \fBplot\fRs and u,v for \fBsplot\fRs.  \fBautoscale\fR in
  3201. parametric mode, then, controls all ranges (t, u, v, x, y, and z) and allows
  3202. x, y, and z to be fully autoscaled.
  3203.  
  3204. Autoscaling works the same way for polar mode as it does for parametric mode
  3205. for \fBplot\fR, with the extension that in polar mode \fBset dummy\fR can be used to
  3206. change the independent variable from t (see \fBset dummy\fR).
  3207.  
  3208. When tics are displayed on second axes but no plot has been specified for
  3209. those axes, x2range and y2range are inherited from xrange and yrange.  This
  3210. is done _before_ xrange and yrange are autoextended to a whole number of
  3211. tics, which can cause unexpected results.
  3212.  
  3213. Examples:
  3214.  
  3215. This sets autoscaling of the y axis (other axes are not affected):
  3216. .br
  3217.       set autoscale y
  3218. .br
  3219.  
  3220. This sets autoscaling only for the minimum of the y axis (the maximum of the
  3221. y axis and the other axes are not affected):
  3222. .br
  3223.       set autoscale ymin
  3224. .br
  3225.  
  3226. This sets autoscaling of the x and y axes:
  3227. .br
  3228.       set autoscale xy
  3229. .br
  3230.  
  3231. This sets autoscaling of the x, y, z, x2 and y2 axes:
  3232. .br
  3233.       set autoscale
  3234. .br
  3235.  
  3236. This disables autoscaling of the x, y, z, x2 and y2 axes:
  3237. .br
  3238.       set noautoscale
  3239. .br
  3240.  
  3241. This disables autoscaling of the z axis only:
  3242. .br
  3243.       set noautoscale z
  3244. .br
  3245. .sp 2
  3246. .RS
  3247. .IP
  3248. .NH 3
  3249. Parametric mode
  3250. .sp 1
  3251. .LP
  3252. .XS
  3253. Parametric mode
  3254. .XE
  3255. When in parametric mode (\fBset parametric\fR), the xrange is as fully scalable
  3256. as the y range.  In other words, in parametric mode the x axis can be
  3257. automatically scaled to fit the range of the parametric function that is
  3258. being plotted.  Of course, the y axis can also be automatically scaled just
  3259. as in the non-parametric case.  If autoscaling on the x axis is not set, the
  3260. current x range is used.
  3261.  
  3262. Data files are plotted the same in parametric and non-parametric mode.
  3263. However, there is a difference in mixed function and data plots: in
  3264. non-parametric mode with autoscaled x, the x range of the datafile controls
  3265. the x range of the functions; in parametric mode it has no influence.
  3266.  
  3267. For completeness a last command \fBset autoscale t\fR is accepted.  However, the
  3268. effect of this "scaling" is very minor.  When \fBgnuplot\fR determines that the
  3269. t range would be empty, it makes a small adjustment if autoscaling is true.
  3270. Otherwise, \fBgnuplot\fR gives an error.  Such behavior may, in fact, not be very
  3271. useful and the command \fBset autoscale t\fR is certainly questionable.
  3272.  
  3273. \fBsplot\fR extends the above ideas as you would expect.  If autoscaling is set,
  3274. then x, y, and z ranges are computed and each axis scaled to fit the
  3275. resulting data.
  3276. .sp 2
  3277. .NH 3
  3278. Polar mode
  3279. .sp 1
  3280. .LP
  3281. .XS
  3282. Polar mode
  3283. .XE
  3284. When in polar mode (\fBset polar\fR), the xrange and the yrange are both found
  3285. from the polar coordinates, and thus they can both be automatically scaled.
  3286. In other words, in polar mode both the x and y axes can be automatically
  3287. scaled to fit the ranges of the polar function that is being plotted.
  3288.  
  3289. When plotting functions in polar mode, the rrange may be autoscaled.  When
  3290. plotting data files in polar mode, the trange may also be autoscaled.  Note
  3291. that if the trange is contained within one quadrant, autoscaling will produce
  3292. a polar plot of only that single quadrant.
  3293.  
  3294. Explicitly setting one or two ranges but not others may lead to unexpected
  3295. results.
  3296. .sp 2
  3297. .RE
  3298. .br
  3299. .NH 2
  3300. Bar
  3301. .sp 1
  3302. .LP
  3303. .XS
  3304. Bar
  3305. .XE
  3306. The \fBset bar\fR command controls the tics at the ends of errorbars.
  3307.  
  3308. Syntax:
  3309. .br
  3310.       set bar {small | large | <size>}
  3311. .br
  3312. .br
  3313.       show bar
  3314. .br
  3315.  
  3316. \fBsmall\fR is a synonym for 0.0, and \fBlarge\fR for 1.0.
  3317. The default is 1.0 if no size is given.
  3318. .sp 2
  3319. .NH 2
  3320. Bmargin
  3321. .sp 1
  3322. .LP
  3323. .XS
  3324. Bmargin
  3325. .XE
  3326. The command \fBset bmargin\fR sets the size of the bottom margin.  Please see
  3327. \fBset margin\fR for details.
  3328. .sp 2
  3329. .NH 2
  3330. Border
  3331. .sp 1
  3332. .LP
  3333. .XS
  3334. Border
  3335. .XE
  3336. The \fBset border\fR and \fBset noborder\fR commands control the display of the graph
  3337. borders for the \fBplot\fR and \fBsplot\fR commands.
  3338.  
  3339. Syntax:
  3340. .br
  3341.       set border {<integer>}
  3342. .br
  3343. .br
  3344.       set noborder
  3345. .br
  3346. .br
  3347.       show border
  3348. .br
  3349.  
  3350. The borders are encoded in a 12-bit integer.  The bottom four bits control
  3351. the border for \fBplot\fR and the sides of the base for \fBsplot\fR, the next four
  3352. bits control the verticals in \fBsplot\fR and the top four bits control the edges
  3353. on top of the \fBsplot\fR.  In detail, the \fB<integer>\fR should be the sum of the
  3354. appropriate entries from the following table:
  3355.  
  3356.  
  3357. .EQ
  3358. delim $$
  3359. .EN
  3360. .KS
  3361. .TS
  3362. center box tab (@) ;
  3363. c c l .
  3364. @plot border@@
  3365. @and@@
  3366. @splot base@splot verticals@splot top
  3367. _
  3368. bottom (south)@1@16@256
  3369. left   (west)@2@32@512
  3370. top    (north)@4@64@1024
  3371. right  (east)@8@128@2048
  3372. .TE
  3373. .KE
  3374. .EQ
  3375. delim off
  3376. .EN
  3377.  
  3378.  
  3379. The default is 31, which is all four sides for \fBplot\fR, and base and z axis
  3380. for \fBsplot\fR.
  3381.  
  3382. To have tics on edges other than bottom and left, disable the usual tics and
  3383. enable the second axes.
  3384.  
  3385. Examples:
  3386.  
  3387. Draw all borders:
  3388. .br
  3389.       set border
  3390. .br
  3391.  
  3392. Draw only the SOUTHWEST borders:
  3393. .br
  3394.       set border 3
  3395. .br
  3396.  
  3397. Draw a complete box around a \fBsplot\fR:
  3398. .br
  3399.       set border 4095
  3400. .br
  3401.  
  3402. Draw a partial box, omitting the front vertical:
  3403. .br
  3404.       set border 127+256+512
  3405. .br
  3406.  
  3407. Draw only the NORTHEAST borders:
  3408. .br
  3409.       set noxtics; set noytics; set x2tics; set y2tics; set border 12
  3410. .br
  3411.  
  3412. .sp 2
  3413. .NH 2
  3414. Boxwidth
  3415. .sp 1
  3416. .LP
  3417. .XS
  3418. Boxwidth
  3419. .XE
  3420. The \fBset boxwidth\fR command is used to set the default width of boxes in the
  3421. \fBboxes\fR and \fBboxerrorbars\fR styles.
  3422.  
  3423. Syntax:
  3424. .br
  3425.       set boxwidth {<width>}
  3426. .br
  3427. .br
  3428.       show boxwidth
  3429. .br
  3430.  
  3431. If a data file is plotted without the width being specified in the third,
  3432. fourth, or fifth column (or \fBusing\fR entry), or if a function is plotted, the
  3433. width of each box is set by the \fBset boxwidth\fR command.  (If a width is given
  3434. both in the file and by the \fBset boxwidth\fR command, the one in the file is
  3435. used.)  If the width is not specified in one of these ways, the width of each
  3436. box will be calculated automatically so that it touches the adjacent boxes.
  3437. In a four-column data set, the fourth column will be interpreted as the box
  3438. width unless the width is set to -2.0, in which case the width will be
  3439. calculated automatically.  See \fBset style boxerrorbars\fR for more details.
  3440.  
  3441. To set the box width to automatic use the command
  3442. .br
  3443.       set boxwidth
  3444. .br
  3445. or, for four-column data,
  3446. .br
  3447.       set boxwidth -2
  3448. .br
  3449.  
  3450. The same effect can be achieved with the \fBusing\fR keyword in \fBplot\fR:
  3451. .br
  3452.       plot 'file' using 1:2:3:4:(-2)
  3453. .br
  3454. .sp 2
  3455. .NH 2
  3456. Clabel
  3457. .sp 1
  3458. .LP
  3459. .XS
  3460. Clabel
  3461. .XE
  3462. \fBgnuplot\fR will vary the linetype used for each contour level when clabel is
  3463. set.  When this option on (the default), a legend labels each linestyle with
  3464. the z level it represents.  It is not possible at present to separate the
  3465. contour labels from the surface key.
  3466.  
  3467. Syntax:
  3468. .br
  3469.       set clabel {'<format>'}
  3470. .br
  3471. .br
  3472.       set noclabel
  3473. .br
  3474. .br
  3475.       show clabel
  3476. .br
  3477.  
  3478. The default for the format string is %8.3g, which gives three decimal places.
  3479. This may produce poor label alignment if the key is altered from its default
  3480. configuration.
  3481.  
  3482. See also \fBset contour\fR.
  3483. .sp 2
  3484. .NH 2
  3485. Clip
  3486. .sp 1
  3487. .LP
  3488. .XS
  3489. Clip
  3490. .XE
  3491. \fBgnuplot\fR can clip data points and lines that are near the boundaries of a
  3492. graph.
  3493.  
  3494. Syntax:
  3495. .br
  3496.       set clip <clip-type>
  3497. .br
  3498. .br
  3499.       set noclip <clip-type>
  3500. .br
  3501. .br
  3502.       show clip
  3503. .br
  3504.  
  3505. Three clip types are supported by \fBgnuplot\fR: \fBpoints\fR, \fBone\fR, and \fBtwo\fR.
  3506. One, two, or all three clip types may be active for a single graph.
  3507.  
  3508. The \fBpoints\fR clip type forces \fBgnuplot\fR to clip (actually, not plot at all)
  3509. data points that fall within but too close to the boundaries.  This is done
  3510. so that large symbols used for points will not extend outside the boundary
  3511. lines.  Without clipping points near the boundaries, the plot may look bad.
  3512. Adjusting the x and y ranges may give similar results.
  3513.  
  3514. Setting the \fBone\fR clip type causes \fBgnuplot\fR to draw a line segment which has
  3515. only one of its two endpoints within the graph.  Only the in-range portion of
  3516. the line is drawn.  The alternative is to not draw any portion of the line
  3517. segment.
  3518.  
  3519. Some lines may have both endpoints out of range, but pass through the graph.
  3520. Setting the \fBtwo\fR clip-type allows the visible portion of these lines to be
  3521. drawn.
  3522.  
  3523. In no case is a line drawn outside the graph.
  3524.  
  3525. The defaults are \fBnoclip points\fR, \fBclip one\fR, and \fBnoclip two\fR.
  3526.  
  3527. To check the state of all forms of clipping, use
  3528. .br
  3529.       show clip
  3530. .br
  3531.  
  3532. For backward compatibility with older versions, the following forms are also
  3533. permitted:
  3534. .br
  3535.       set clip
  3536. .br
  3537. .br
  3538.       set noclip
  3539. .br
  3540.  
  3541. \fBset clip\fR is synonymous with \fBset clip points\fR; \fBset noclip\fR turns off all
  3542. three types of clipping.
  3543. .sp 2
  3544. .NH 2
  3545. Cntrparam
  3546. .sp 1
  3547. .LP
  3548. .XS
  3549. Cntrparam
  3550. .XE
  3551. \fBset cntrparam\fR controls the generation of contours and their smoothness for
  3552. a contour plot.
  3553.  
  3554. Syntax:
  3555. .br
  3556.       set cntrparam {  {linear | cubicspline | bspline}
  3557. .br
  3558. .br
  3559.                      | points <n> | order <n>
  3560. .br
  3561. .br
  3562.                      | levels  {auto} {<n>}
  3563. .br
  3564. .br
  3565.                              | discrete <z1> {,<z2>} ...
  3566. .br
  3567. .br
  3568.                              | incremental {<start>, <incr> {,<end>}} }
  3569. .br
  3570. .br
  3571.       show cntrparam
  3572. .br
  3573.  
  3574. This command controls the way contours are plotted.  <n> should be an
  3575. integral constant expression and <z1>, <z2> ... any constant expressions.
  3576. The parameters are:
  3577.  
  3578. \fBlinear\fR, \fBcubicspline\fR, \fBbspline\fR---Controls type of approximation or
  3579. interpolation.  If \fBlinear\fR, then the contours are drawn piecewise linear, as
  3580. extracted from the surface directly.  If \fBcubicspline\fR, then piecewise linear
  3581. contours are interpolated to form somewhat smoother contours, but which may
  3582. undulate.  If \fBbspline\fR, a guaranteed-smoother curve is drawn, which only
  3583. approximates the piecewise linear data.
  3584.  
  3585. \fBpoints\fR---Eventually all drawings are done with piecewise linear strokes.
  3586. This number controls the number of points used to approximate a curve.
  3587. It is relevant only for \fBcubicspline\fR and \fBbspline\fR modes.
  3588.  
  3589. \fBorder\fR---Order of the bspline approximation to be used.  The bigger this
  3590. order is, the smoother the resulting contour.  (Of course, higher order
  3591. bspline curves will move further away from the original piecewise linear
  3592. data.)  This option is relevant for \fBbspline\fR mode only.  Allowed values are
  3593. integers in the range from 2 (linear) to 10.
  3594.  
  3595. \fBlevels\fR---Approximate number of contour levels.  Selection of the levels is
  3596. controlled by \fBauto\fR (default), \fBdiscrete\fR, and \fBincremental\fR.  For \fBauto\fR,
  3597. if the surface is bounded by zmin and zmax, contours will be generated at
  3598. integer multiples of dz between zmin and zmax, where dz is 1, 2, or 5 times
  3599. some power of ten (like the step between two tic marks).  For \fBdiscrete\fR,
  3600. contours will be generated at z = <z1>, <z2> ... as specified.  The number of
  3601. discrete levels is limited to MAX_DISCRETE_LEVELS, defined in plot.h to be
  3602. 30.  If \fBincremental\fR, contours are generated at values of z beginning at
  3603. <start> and increasing by <increment> until <end> is reached.  If <end> is
  3604. not specified, MAX_DISCRETE_LEVELS will be generated.
  3605.  
  3606. If the command \fBset cntrparam\fR is given without any arguments specified,  the
  3607. defaults are used: linear, 5 points, order 4, 5 \fBauto\fR levels.
  3608.  
  3609. Examples:
  3610. .br
  3611.       set cntrparam bspline
  3612. .br
  3613. .br
  3614.       set cntrparam points 7
  3615. .br
  3616. .br
  3617.       set cntrparam order 10
  3618. .br
  3619.  
  3620. To select 5 levels automatically:
  3621. .br
  3622.       set cntrparam levels auto 5
  3623. .br
  3624.  
  3625. To specify discrete levels at .1, .37, and .9:
  3626. .br
  3627.       set cntrparam levels discrete .1,1/exp(1),.9
  3628. .br
  3629.  
  3630. To specify levels from 0 to 4 with increment 1:
  3631. .br
  3632.       set cntrparam levels incremental  0,1,4
  3633. .br
  3634.  
  3635. To set the number of levels to 10 (retaining the current settings of auto,
  3636. discr. and increment\&'s start and increment value, while changing its end):
  3637. .br
  3638.       set cntrparam levels 10
  3639. .br
  3640.  
  3641. To set the start and increment while retaining the number of levels:
  3642. .br
  3643.       set cntrparam levels incremental 100,50
  3644. .br
  3645.  
  3646. See also \fBset contour\fR for control of where the contours are drawn, and \fBset
  3647. clabel\fR for control of the format of the contour labels.
  3648. .sp 2
  3649. .NH 2
  3650. Contour
  3651. .sp 1
  3652. .LP
  3653. .XS
  3654. Contour
  3655. .XE
  3656. \fBset contour\fR enables contour drawing for surfaces. This option is available
  3657. for \fBsplot\fR only.
  3658.  
  3659. Syntax:
  3660. .br
  3661.       set contour {base | surface | both}
  3662. .br
  3663. .br
  3664.       set nocontour
  3665. .br
  3666. .br
  3667.       show contour
  3668. .br
  3669.  
  3670. The three options specify where to draw the contours: \fBbase\fR draws the
  3671. contours on the grid base where the x/ytics are placed, \fBsurface\fR draws the
  3672. contours on the surfaces themselves, and \fBboth\fR draws the contours on both
  3673. the base and the surface.  If no option is provided, the default is \fBbase\fR.
  3674.  
  3675. See also \fBset cntrparam\fR for the parameters that affect the drawing of
  3676. contours, and \fBset clabel\fR for control of labelling of the contours.
  3677.  
  3678. The surface can be switched off (see \fBset surface\fR), giving a contour-only
  3679. graph.  Though it is possible to use \fBset view\fR to enlarge the plot to fill
  3680. the screen, better results can be obtained by writing the contour information
  3681. out to a file, and rereading it as a 2-d datafile plot:
  3682.  
  3683. .br
  3684.       set nosurface
  3685. .br
  3686. .br
  3687.       set contour
  3688. .br
  3689. .br
  3690.       set cntrparam ...
  3691. .br
  3692. .br
  3693.       set term table
  3694. .br
  3695. .br
  3696.       set out 'filename'
  3697. .br
  3698. .br
  3699.       splot ...
  3700. .br
  3701. .br
  3702.       set out
  3703. .br
  3704. .br
  3705.       # contour info now in filename
  3706. .br
  3707. .br
  3708.       set term <whatever>
  3709. .br
  3710. .br
  3711.       plot 'filename'
  3712. .br
  3713.  
  3714. In order to draw contours, the data must be organized as "grid data".  In
  3715. such a file all of the points for a single y value are listed, then all the
  3716. points for the next y, and so on.  A single blank line (a line containing no
  3717. characters other than blank spaces and a carriage return and/or a line feed)
  3718. separates one y value group from the next.  See also \fBplot datafile\fR.
  3719.  
  3720. If contours are desired from non-grid data, \fBset dgrid3d\fR can be used to
  3721. create an appropriate grid.  See \fBset dgrid3d\fR for more information.
  3722. .sp 2
  3723. .NH 2
  3724. Data style
  3725. .sp 1
  3726. .LP
  3727. .XS
  3728. Data style
  3729. .XE
  3730. The \fBset data style\fR command changes the default plotting style for data
  3731. plots.
  3732.  
  3733. Syntax:
  3734. .br
  3735.       set data style <style-choice>
  3736. .br
  3737. .br
  3738.       show data style
  3739. .br
  3740.  
  3741. See \fBset style\fR for the choices.  If no choice is given, the choices are
  3742. listed.  \fBshow data style\fR shows the current default data plotting style.
  3743. .sp 2
  3744. .NH 2
  3745. Dgrid3d
  3746. .sp 1
  3747. .LP
  3748. .XS
  3749. Dgrid3d
  3750. .XE
  3751. The \fBset dgrid3d\fR command enables and sets the different parameters for
  3752. non-grid to grid data mapping.
  3753.  
  3754. Syntax:
  3755. .br
  3756.       set dgrid3d {<row_size>} {,{<col_size>} {,<norm>}}
  3757. .br
  3758. .br
  3759.       set nodgrid3d
  3760. .br
  3761. .br
  3762.       show dgrid3d
  3763. .br
  3764.  
  3765. By default \fBdgrid3d\fR is disabled.  When enabled, 3-d data read from a file
  3766. are always treated as a scattered data set.  A grid with dimensions derived
  3767. from a bounding box of the scattered data and size as specified by the
  3768. row/col_size parameters is created for plotting and contouring.  The grid is
  3769. equally spaced in x and y; the z values are computed as weighted averages of
  3770. the scattered points\&' values.
  3771.  
  3772. The third parameter, norm, controls the weighting: each point is weighted
  3773. inversely by its distance (from the grid point) raised to the norm power.
  3774. (Actually it\&'s not quite the distance: the weights are given by the inverse
  3775. of dx^norm + dy^norm, where dx and dy are the components of the separation
  3776. of the grid point from each data point.)  Thus the closer the data point is
  3777. to a grid point, the more effect it has on that grid point.  In \fBgnuplot\fR,
  3778. this distance computation is optimized for norms that are powers of 2,
  3779. specifically 1, 2, 4, 8, and 16, but any non-negative integer can be used.
  3780.  
  3781. The \fBdgrid3d\fR option is a simple low pass filter that converts scattered data
  3782. to a grid data set.  More sophisticated approaches to this problem exist and
  3783. should be used to preprocess the data outside \fBgnuplot\fR if this simple
  3784. solution is found inadequate.
  3785.  
  3786. Examples:
  3787. .br
  3788.       set dgrid3d 10,10,1     # defaults
  3789. .br
  3790. .br
  3791.       set dgrid3d ,,4
  3792. .br
  3793.  
  3794. The first specifies that a grid of size 10 by 10 is to be constructed using
  3795. the L2 norm (a norm of 2 is to be used in the distance computation).  The
  3796. second only modifies the norm to be used to L4.
  3797.  
  3798. .sp 2
  3799. .NH 2
  3800. Dummy
  3801. .sp 1
  3802. .LP
  3803. .XS
  3804. Dummy
  3805. .XE
  3806. The \fBset dummy\fR command changes the default dummy variable names.
  3807.  
  3808. Syntax:
  3809. .br
  3810.       set dummy {<dummy-var>} {,<dummy-var>}
  3811. .br
  3812. .br
  3813.       show dummy
  3814. .br
  3815.  
  3816. By default, \fBgnuplot\fR assumes that the independent, or "dummy", variable for
  3817. the \fBplot\fR command is "t" if in parametric or polar mode, or "x" otherwise.
  3818. Similarly the independent variables for the \fBsplot\fR command are "u" and "v"
  3819. in parametric mode (\fBsplot\fR cannot be used in polar mode), or "x" and "y"
  3820. otherwise.
  3821.  
  3822. It may be more convenient to call a dummy variable by a more physically
  3823. meaningful or conventional name.  For example, when plotting time functions:
  3824.  
  3825. .br
  3826.       set dummy t
  3827. .br
  3828. .br
  3829.       plot sin(t), cos(t)
  3830. .br
  3831.  
  3832. At least one dummy variable must be set on the command; \fBset dummy\fR by itself
  3833. will generate an error message.
  3834.  
  3835. Examples:
  3836. .br
  3837.       set dummy u,v
  3838. .br
  3839. .br
  3840.       set dummy ,s
  3841. .br
  3842.  
  3843. The second example sets the second variable to s.
  3844. .sp 2
  3845. .NH 2
  3846. Encoding
  3847. .sp 1
  3848. .LP
  3849. .XS
  3850. Encoding
  3851. .XE
  3852. The \fBset encoding\fR command selects a character encoding.  Valid values are
  3853. \fBdefault\fR, which does nothing; \fBiso_8859_1\fR (known in the PostScript world as
  3854. \fBISO-Latin1\fR), which is used on many Unix workstations and with MS-Windows;
  3855. \fBcp850\fR, for OS/2; and \fBcp437\fR, for MS-DOS.
  3856.  
  3857. Syntax:
  3858. .br
  3859.       set encoding <value>
  3860. .br
  3861. .br
  3862.       show encoding
  3863. .br
  3864.  
  3865. Please note that this is not supported on all terminal types.  Note also that
  3866. the device must be able to produce the non-standard characters.
  3867. .sp 2
  3868. .NH 2
  3869. Format
  3870. .sp 1
  3871. .LP
  3872. .XS
  3873. Format
  3874. .XE
  3875. The format of the tic-mark labels can be set with the \fBset format\fR command.
  3876.  
  3877. Syntax:
  3878. .br
  3879.       set format {<axes>} {"<format-string>"}
  3880. .br
  3881. .br
  3882.       set format {<axes>} {'<format-string>'}
  3883. .br
  3884. .br
  3885.       show format
  3886. .br
  3887.  
  3888. where <axes> is either \fBx\fR, \fBy\fR, \fBz\fR, \fBxy\fR, \fBx2\fR, \fBy2\fR or nothing (which is
  3889. the same as \fBxy\fR).  The length of the string representing a ticmark (after
  3890. formatting with \&'printf\&') is restricted to 100 characters.  If the format
  3891. string is omitted, the format will be returned to the default "%g".  For
  3892. LaTeX users, the format "$%g$" is often desirable.  If the empty string "" is
  3893. used, no label will be plotted with each tic, though the tic mark will still
  3894. be plotted.  To eliminate all tic marks, use \fBset noxtics\fR or \fBset noytics\fR.
  3895.  
  3896. Newline (\\n) is accepted in the format string.  Use double-quotes rather than
  3897. single-quotes to enable such interpretation.  See also \fBsyntax\fR.
  3898.  
  3899. The default format for both axes is "%g", but other formats such as "%.2f" or
  3900. "%3.0em" are often desirable.  Anything accepted by \&'printf\&' when given a
  3901. double precision number, and accepted by the terminal, will work.  Some other
  3902. options have been added.  If the format string looks like a floating point
  3903. format, then \fBgnuplot\fR tries to construct a reasonable format.
  3904.  
  3905. Characters not preceded by "%" are printed verbatim.  Thus you can include
  3906. spaces and labels in your format string, such as "%g m", which will put " m"
  3907. after each number.  If you want "%" itself, double it: "%g %%".
  3908.  
  3909. The acceptable formats (if not in date/time mode) are:
  3910.  
  3911.  
  3912. .EQ
  3913. delim $$
  3914. .EN
  3915. .KS
  3916. .TS
  3917. center box tab (@) ;
  3918. c c l .
  3919. Format@Explanation
  3920. _
  3921. %f@floating point notation
  3922. %e or %E@exponential notation; an "e" or "E" before the power
  3923. %g or %G@the shorter of %e (or %E) and %f
  3924. %x or %X@hex
  3925. %o or %O@octal
  3926. %t@mantissa to base 10
  3927. %l@mantissa to base of current logscale
  3928. %s@mantissa to base of current logscale; scientific power
  3929. %T@power to base 10
  3930. %L@power to base of current logscale
  3931. %S@scientific power
  3932. %c@character replacement for scientific power
  3933. %P@multiple of pi
  3934. _
  3935. .TE
  3936. .KE
  3937. .EQ
  3938. delim off
  3939. .EN
  3940.  
  3941.  
  3942. A \&'scientific\&' power is one such that the exponent is a multiple of three.
  3943. Character replacement of scientific powers (\fB"%c"\fR) has been implemented
  3944. for powers in the range -18 to +18.  For numbers outside of this range the
  3945. format reverts to exponential.
  3946.  
  3947. Other acceptable modifiers (which come after the "%" but before the format
  3948. specifier) are "-", which left-justifies the number; "+", which forces all
  3949. numbers to be explicitly signed; "#", which places a decimal point after
  3950. floats that have only zeroes following the decimal point; a positive integer,
  3951. which defines the field width; "0" (the digit, not the letter) immediately
  3952. preceding the field width, which indicates that leading zeroes are to be used
  3953. instead of leading blanks; and a decimal point followed by a non-negative
  3954. integer, which defines the precision (the minimum number of digits of an
  3955. integer, or the number of digits following the decimal point of a float).
  3956.  
  3957. Some releases of \&'printf\&' may not support all of these modifiers but may also
  3958. support others; in case of doubt, check the appropriate documentation and
  3959. then experiment.
  3960.  
  3961. Examples:
  3962. .br
  3963.       set format y "%t"; set ytics (5,10)          # "5.0" and "1.0"
  3964. .br
  3965. .br
  3966.       set format y "%s"; set ytics (500,1000)      # "500" and "1.0"
  3967. .br
  3968. .br
  3969.       set format y "+-12.3f"; set ytics(12345)     # "+12345.000  "
  3970. .br
  3971. .br
  3972.       set format y "%.2t*10^%+03T"; set ytic(12345)# "1.23*10^+04"
  3973. .br
  3974. .br
  3975.       set format y "%s*10^{%S}"; set ytic(12345)   # "12.345*10^{3}"
  3976. .br
  3977. .br
  3978.       set format y "%s %cg"; set ytic(12345)       # "12.345 kg"
  3979. .br
  3980. .br
  3981.       set format y "%.0P pi"; set ytic(6.283185)   # "2 pi"
  3982. .br
  3983. .br
  3984.       set format y "%.0P%%"; set ytic(50)          # "50%"
  3985. .br
  3986.  
  3987. .br
  3988.       set log y 2; set format y '%l'; set ytics (1,2,3)
  3989. .br
  3990. .br
  3991.       #displays "1.0", "1.0" and "1.5" (since 3 is 1.5 * 2^1)
  3992. .br
  3993.  
  3994. There are some problem cases that arise when numbers like 9.999 are printed
  3995. with a format that requires both rounding and a power.
  3996.  
  3997. If the data type for the axis is date/time, the format string must contain
  3998. valid codes for the \&'strftime\&' function (outside of \fBgnuplot\fR, type "man
  3999. strftime").  See \fBset timefmt\fR for a list of the allowed input format codes.
  4000.  
  4001. In date/time mode, the acceptable formats are:
  4002.  
  4003.  
  4004. .EQ
  4005. delim $$
  4006. .EN
  4007. .KS
  4008. .TS
  4009. center box tab (@) ;
  4010. c c l .
  4011. Format@Explanation
  4012. _
  4013. %a@abbreviated name of day of the week
  4014. %A@full name of day of the week
  4015. %b or %h@abbreviated name of the month
  4016. %B@full name of the month
  4017. %d@day of the month, 1--31
  4018. %D@shorthand for "%m/%d/%y"
  4019. %H or %k@hour, 0--24
  4020. %I or %l@hour, 0--12
  4021. %j@day of the year, 1--366
  4022. %m@month, 1--12
  4023. %M@minute, 0--60
  4024. %p@"am" or "pm"
  4025. %r@shorthand for "%I:%M:%S %p"
  4026. %R@shorthand for %H:%M"
  4027. %S@second, 0--60
  4028. %T@shorthand for "%H:%M:%S"
  4029. %U@week of the year (week starts on Sunday)
  4030. %w@day of the week, 0--6 (Sunday = 0)
  4031. %W@week of the year (week starts on Monday)
  4032. %y@year, 0-99
  4033. %Y@year, 4-digit
  4034. _
  4035. .TE
  4036. .KE
  4037. .EQ
  4038. delim off
  4039. .EN
  4040.  
  4041.  
  4042. Except for the non-numerical formats, these may be preceded by a "0" ("zero",
  4043. not "oh") to pad the field length with leading zeroes, and a positive digit,
  4044. to define the minimum field width (which will be overridden if the specified
  4045. width is not large enough to contain the number).  There is a 24-character
  4046. limit to the length of the printed text; longer strings will be truncated.
  4047.  
  4048. Examples:
  4049.  
  4050. Suppose the text is "76/12/25 23:11:11".  Then
  4051. .br
  4052.       set format x                 # defaults to "12/25/76" \\n "23:11"
  4053. .br
  4054. .br
  4055.       set format x "%A, %d %b %Y"  # "Saturday, 25 Dec 1976"
  4056. .br
  4057. .br
  4058.       set format x "%r %d"         # "11:11:11 pm 12/25/76"
  4059. .br
  4060.  
  4061. Suppose the text is "98/07/06 05:04:03".  Then
  4062. .br
  4063.       set format x "%1y/%2m/%3d %01H:%02M:%03S"  # "98/ 7/  6 5:04:003"
  4064. .br
  4065.  
  4066. See also \fBset xtics\fR for more information about tic labels.
  4067. .sp 2
  4068. .NH 2
  4069. Function style
  4070. .sp 1
  4071. .LP
  4072. .XS
  4073. Function style
  4074. .XE
  4075. The \fBset function style\fR command changes the default plotting style for
  4076. function plots.
  4077.  
  4078. Syntax:
  4079. .br
  4080.       set function style <style-choice>
  4081. .br
  4082. .br
  4083.       show function style
  4084. .br
  4085.  
  4086. See \fBset style\fR for the choices.  If no choice is given, the choices are
  4087. listed.  \fBshow function style\fR shows the current default function plotting
  4088. style.
  4089. .sp 2
  4090. .NH 2
  4091. Functions
  4092. .sp 1
  4093. .LP
  4094. .XS
  4095. Functions
  4096. .XE
  4097. The \fBshow functions\fR command lists all user-defined functions and their
  4098. definitions.
  4099.  
  4100. Syntax:
  4101. .br
  4102.       show functions
  4103. .br
  4104.  
  4105. For information about the definition and usage of functions in \fBgnuplot\fR,
  4106. please see \fBexpressions\fR and \fBuser-defined\fR.
  4107. .sp 2
  4108. .NH 2
  4109. Grid
  4110. .sp 1
  4111. .LP
  4112. .XS
  4113. Grid
  4114. .XE
  4115. The \fBset grid\fR command allows grid lines to be drawn on the plot.
  4116.  
  4117. Syntax:
  4118. .br
  4119.       set grid {{no}{m}xtics} {{no}{m}ytics} {{no}{m}ztics}
  4120. .br
  4121. .br
  4122.                {{no}{m}x2tics} {{no}{m}y2tics}
  4123. .br
  4124. .br
  4125.                {polar {<angle>}} {<major_linetype> {<minor_linetype>}}
  4126. .br
  4127. .br
  4128.       set nogrid
  4129. .br
  4130. .br
  4131.       show grid
  4132. .br
  4133.  
  4134. The grid can be enabled and disabled for the major and/or minor tic marks on
  4135. any axis, and the linetype can be specified for major and minor grid lines.
  4136. But note that <major_linetype> and <minor_linetype> are indices in the
  4137. default linetype list provided by the terminal; user-defined linetypes (via
  4138. the \fBset linestyle\fR command) are not accessible for grid lines.
  4139.  
  4140. Additionally, a polar grid can be selected for 2-d plots---circles are drawn
  4141. to intersect the selected tics, and radial lines are drawn at definable
  4142. intervals.  (The interval is given in degrees or radians ,depending on the
  4143. \fBset angles\fR setting.)  Note that a polar grid is no longer automatically
  4144. generated in polar mode.
  4145.  
  4146. The pertinent tics must be enabled before \fBset grid\fR can draw them; \fBgnuplot\fR
  4147. will quietly ignore instructions to draw grid lines at non-existent tics, but
  4148. they will appear if the tics are subsequently enabled.
  4149.  
  4150. If no linetype is specified for the minor gridlines, the same linetype as the
  4151. major gridlines is used.  The default polar angle is 30 degrees.
  4152.  
  4153. Z grid lines are drawn on the back of the plot.  This looks better if a
  4154. partial box is drawn around the plot---see \fBset border\fR.
  4155. .sp 2
  4156. .NH 2
  4157. Hidden3d
  4158. .sp 1
  4159. .LP
  4160. .XS
  4161. Hidden3d
  4162. .XE
  4163. The \fBset hidden3d\fR command enables hidden line removal for explicit surface
  4164. plotting (see \fBsplot\fR).
  4165.  
  4166. Syntax:
  4167. .br
  4168.       set hidden3d
  4169. .br
  4170. .br
  4171.       set nohidden3d
  4172. .br
  4173. .br
  4174.       show hidden3d
  4175. .br
  4176.  
  4177. Hidden line removal may be used for both explicit functions and for explicit
  4178. data.  It now works for parametric surfaces as well.  This mode is meaningful
  4179. only when surfaces are \fBsplot\fRted \fBwith lines\fR.
  4180.  
  4181. When this flag is set, both the hidden portion of the surface and possibly
  4182. its hidden contours (see \fBset contour\fR) as well as the hidden grid will be
  4183. removed.  Each surface has its hidden parts removed with respect to itself
  4184. and to other surfaces, if more than one surface is plotted.  But contours
  4185. drawn on the surface (\fBset contour surface\fR) don\&'t seem to work.  Labels and
  4186. arrows are always visible and are unaffected.
  4187. .sp 2
  4188. .NH 2
  4189. Isosamples
  4190. .sp 1
  4191. .LP
  4192. .XS
  4193. Isosamples
  4194. .XE
  4195. The isoline density of surfaces may be changed by the \fBset isosamples\fR
  4196. command.
  4197.  
  4198. Syntax:
  4199. .br
  4200.       set isosamples <iso_1> {,<iso_2>}
  4201. .br
  4202. .br
  4203.       show isosamples
  4204. .br
  4205.  
  4206. Each surface plot will have <iso_1> iso-u lines and <iso_2> iso-v lines.  If
  4207. you only specify <iso_1>, <iso_2> will be set to the same value as <iso_1>.
  4208. By default, sampling is set to 10 isolines per u or v axis.  A higher
  4209. sampling rate will produce more accurate plots, but will take longer.  These
  4210. parameters have no effect on data file plotting.
  4211.  
  4212. An isoline is a curve parameterized by one of the surface parameters while
  4213. the other surface parameter is fixed.  Isolines provide a simple means to
  4214. display a surface.  By fixing the u parameter of surface s(u,v), the iso-u
  4215. lines of the form c(v) = s(u0,v) are produced, and by fixing the v parameter,
  4216. the iso-v lines of the form c(u) = s(u,v0) are produced.
  4217.  
  4218. When a surface plot is being done without the removal of hidden lines, \fBset
  4219. samples\fR also has an effect on the number of points being evaluated---it
  4220. controls the number of points sampled along each isoline.  See \fBset samples\fR.
  4221. .sp 2
  4222. .NH 2
  4223. Key
  4224. .sp 1
  4225. .LP
  4226. .XS
  4227. Key
  4228. .XE
  4229. The \fBset key\fR enables a key (or legend) describing plots on a plot.
  4230.  
  4231. The contents of the key, i.e., the names given to each plotted data set and
  4232. function and samples of the lines and/or symbols used to represent them, are
  4233. determined by the \fBtitle\fR and \fBwith\fR options of the {\fBs\fR}\fBplot\fR command.
  4234. Please see \fBplot title\fR and \fBplot with\fR for more information.
  4235.  
  4236. Syntax:
  4237. .br
  4238.       set key {  left | right | top | bottom | outside | below
  4239. .br
  4240. .br
  4241.                | <position>}
  4242. .br
  4243. .br
  4244.               {Left | Right} {{no}reverse}
  4245. .br
  4246. .br
  4247.               {samplen <sample_length>} {spacing <vertical_spacing>}
  4248. .br
  4249. .br
  4250.               {width <width_increment>}
  4251. .br
  4252. .br
  4253.               {title "<text>"} {{no}box {<linetype>}}
  4254. .br
  4255. .br
  4256.       set nokey
  4257. .br
  4258. .br
  4259.       show key
  4260. .br
  4261.  
  4262. By default the key is placed in the upper right corner of the graph.  The
  4263. keywords \fBleft\fR, \fBright\fR, \fBtop\fR, \fBbottom\fR, \fBoutside\fR and \fBbelow\fR may be used
  4264. to place the key in the other corners inside the graph or to the right
  4265. (outside) or below the graph.  They may be given alone or combined.
  4266.  
  4267. Justification of the labels within the key is controlled by \fBLeft\fR or \fBRight\fR
  4268. (default is \fBRight\fR).  The text and sample can be reversed (\fBreverse\fR) and a
  4269. box can be drawn around the key (\fBbox {<linetype>}\fR) in a specified linetype.
  4270. But note that <linetype> is an index in the default linetype list provided by
  4271. the terminal; user-defined linetypes (via the \fBset linestyle\fR command) are
  4272. not accessible for the key box.
  4273.  
  4274. The length of the sample line can be controlled by \fBsamplen\fR.  The sample
  4275. length is computed as the sum of the tic length and <sample_length> times the
  4276. character width.  \fBsamplen\fR also affects the positions of point samples in
  4277. the key since these are drawn at the midpoint of the sample line, even if it
  4278. is not drawn.  <sample_length> must be an integer.
  4279.  
  4280. The vertical spacing between lines is controlled by \fBspacing\fR.  The spacing
  4281. is set equal to the product of the pointsize, the vertical tic size, and
  4282. <vertical_spacing>.  The program will guarantee that the vertical spacing is
  4283. no smaller than the character height.
  4284.  
  4285. The <width_increment> is a number of character widths to be added to or
  4286. subtracted from the length of the string.  This is useful only when you are
  4287. putting a box around the key and you are using control characters in the text.
  4288. \fBgnuplot\fR simply counts the number of characters in the string when computing
  4289. the box width; this allows you to correct it.
  4290.  
  4291. A title can be put on the key (\fBtitle "<text>"\fR)---see also \fBsyntax\fR for the
  4292. distinction between text in single- or double-quotes.  The key title uses the
  4293. same justification as do the plot titles.
  4294.  
  4295. The defaults for \fBset key\fR are \fBright\fR, \fBtop\fR, \fBRight\fR, \fBnoreverse\fR, \fBsamplen
  4296. 4\fR, \fBspacing 1.25\fR, \fBtitle ""\fR, and \fBnobox\fR.  The default <linetype> is the
  4297. same as that used for the plot borders.  Entering \fBset key\fR with no options
  4298. returns the key to its default configuration.
  4299.  
  4300. The <position> can be a simple x,y,z as in previous versions, but these can
  4301. be preceded by one of four keywords (\fBfirst\fR, \fBsecond\fR, \fBgraph\fR, \fBscreen\fR)
  4302. which selects the coordinate system in which the position is specified.  See
  4303. \fBcoordinates\fR for more details.
  4304.  
  4305. The key is drawn as a sequence of lines, with one plot described on each
  4306. line.  On the right-hand side (or the left-hand side, if \fBreverse\fR is
  4307. selected) of each line is a representation that attempts to mimic the way the
  4308. curve is plotted.  On the other side of each line is the text description
  4309. (the line title), obtained from the \fBplot\fR command.  The lines are vertically
  4310. arranged so that an imaginary straight line divides the left- and right-hand
  4311. sides of the key.  It is the coordinates of the top of this line that are
  4312. specified with the \fBset key\fR command.  In a \fBplot\fR, only the x and y
  4313. coordinates are used to specify the line position.  For a \fBsplot\fR, x, y and
  4314. z are all used as a 3-d location mapped using the same mapping as the graph
  4315. itself to form the required 2-d screen position of the imaginary line.
  4316.  
  4317. Some or all of the key may be outside of the graph boundary, although this
  4318. may interfere with other labels and may cause an error on some devices.  If
  4319. you use the keywords \fBoutside\fR or \fBbelow\fR, \fBgnuplot\fR makes space for the keys
  4320. and the graph becomes smaller.  Putting keys outside to the right, they
  4321. occupy as few columns as possible, and putting them below, as many columns as
  4322. possible (depending of the length of the labels), thus stealing as little
  4323. space from the graph as possible.
  4324.  
  4325. When using the TeX or PostScript drivers, or similar drivers where formatting
  4326. information is embedded in the string, \fBgnuplot\fR is unable to calculate
  4327. correctly the width of the string for key positioning.  If the key is to be
  4328. positioned at the left, it may be convenient to use the combination  \fBset key
  4329. left Left reverse\fR.  The box and gap in the grid will be the width of the
  4330. literal string.
  4331.  
  4332. If \fBsplot\fR is being used to draw contours, the contour labels will be listed
  4333. in the key.  If the alignment of these labels is poor or a different number
  4334. of decimal places is desired, the label format can be specified.  See \fBset
  4335. clabel\fR for details.
  4336.  
  4337. Examples:
  4338.  
  4339. This places the key at the default location:
  4340. .br
  4341.       set key
  4342. .br
  4343.  
  4344. This disables the key:
  4345. .br
  4346.       set nokey
  4347. .br
  4348.  
  4349. This places a key at coordinates 2,3.5,2 in the default (first) coordinate
  4350. system:
  4351. .br
  4352.       set key 2,3.5,2
  4353. .br
  4354.  
  4355. This places the key below the graph:
  4356. .br
  4357.       set key below
  4358. .br
  4359.  
  4360. This places the key in the bottom left corner, left-justifies the text,
  4361. gives it a title, and draws a box around it in linetype 3:
  4362. .br
  4363.       set key left bottom Left title 'Legend' box 3
  4364. .br
  4365. .sp 2
  4366. .NH 2
  4367. Label
  4368. .sp 1
  4369. .LP
  4370. .XS
  4371. Label
  4372. .XE
  4373. Arbitrary labels can be placed on the plot using the \fBset label\fR command.
  4374.  
  4375. Syntax:
  4376. .br
  4377.       set label {<tag>} {"<label_text>"} {at <position>}
  4378. .br
  4379. .br
  4380.                 {<justification>} {{no}rotate} {font "<name><,size>"}
  4381. .br
  4382. .br
  4383.       set nolabel {<tag>}
  4384. .br
  4385. .br
  4386.       show label
  4387. .br
  4388.  
  4389. The <position> is specified by either x,y or x,y,z, and may be preceded by
  4390. \fBfirst\fR, \fBsecond\fR, \fBgraph\fR, or \fBscreen\fR to select the coordinate system.
  4391. See \fBcoordinates\fR for details.
  4392.  
  4393. The tag is an integer that is used to identify the label. If no <tag> is
  4394. given, the lowest unused tag value is assigned automatically.  The tag can be
  4395. used to delete or modify a specific label.  To change any attribute of an
  4396. existing label, use the \fBset label\fR command with the appropriate tag, and
  4397. specify the parts of the label to be changed.
  4398.  
  4399. By default, the text is placed flush left against the point x,y,z.  To adjust
  4400. the way the label is positioned with respect to the point x,y,z, add the
  4401. parameter <justification>, which may be \fBleft\fR, \fBright\fR or \fBcenter\fR,
  4402. indicating that the point is to be at the left, right or center of the text.
  4403. Labels outside the plotted boundaries are permitted but may interfere with
  4404. axis labels or other text.
  4405.  
  4406. If \fBrotate\fR is given, the label is written vertically (if the terminal can do
  4407. so, of course).
  4408.  
  4409. If one (or more) axis is timeseries, the appropriate coordinate should be
  4410. given as a quoted time string according to the \fBtimefmt\fR format string.  See
  4411. \fBset xdata\fR and \fBset timefmt\fR.
  4412.  
  4413. The EEPIC, Imagen, LaTeX, and TPIC drivers allow \\\\ in a string to specify
  4414. a newline.
  4415.  
  4416. Examples:
  4417.  
  4418. To set a label at (1,2) to "y=x", use:
  4419. .br
  4420.       set label "y=x" at 1,2
  4421. .br
  4422.  
  4423. To set a label of the sign Sigma of size 24 at the center of the graph, use:
  4424. .br
  4425.       set label "S" at graph 0.5,0.5 center font "Symbol,24"
  4426. .br
  4427.  
  4428. To set a label "y=x^2" with the right of the text at (2,3,4), and tag the
  4429. label as number 3, use:
  4430. .br
  4431.       set label 3 "y=x^2" at 2,3,4 right
  4432. .br
  4433.  
  4434. To change the preceding label to center justification, use:
  4435. .br
  4436.       set label 3 center
  4437. .br
  4438.  
  4439. To delete label number 2, use:
  4440. .br
  4441.       set nolabel 2
  4442. .br
  4443.  
  4444. To delete all labels, use:
  4445. .br
  4446.       set nolabel
  4447. .br
  4448.  
  4449. To show all labels (in tag order), use:
  4450. .br
  4451.       show label
  4452. .br
  4453.  
  4454. To set a label on a graph with a timeseries on the x axis, use, for example:
  4455. .br
  4456.       set timefmt "%d/%m/%y,%H:%M"
  4457. .br
  4458. .br
  4459.       set label "Harvest" at "25/8/93",1
  4460. .br
  4461. .sp 2
  4462. .NH 2
  4463. Linestyle
  4464. .sp 1
  4465. .LP
  4466. .XS
  4467. Linestyle
  4468. .XE
  4469. Each terminal has a default set of line and point types, which can be seen
  4470. by using the command \fBtest\fR.  \fBset linestyle\fR defines a set of line types
  4471. and widths and point types and sizes so that you can refer to them later by
  4472. an index instead of repeating all the information at each invocation.
  4473.  
  4474. Syntax:
  4475. .br
  4476.       set linestyle <index> {linetype | lt <line_type>}
  4477. .br
  4478. .br
  4479.                             {linewidth | lw <line_width>}
  4480. .br
  4481. .br
  4482.                             {pointtype | pt <point_type>}
  4483. .br
  4484. .br
  4485.                             {pointsize | ps <point_size>}
  4486. .br
  4487. .br
  4488.       set nolinestyle
  4489. .br
  4490. .br
  4491.       show linestyle
  4492. .br
  4493.  
  4494. The line and point types are taken from the default types for the terminal
  4495. currently in use.  The line width and point size are multipliers for the
  4496. default width and size (but note that <point_size> here is unaffected by
  4497. the multiplier given on \&'set pointsize\&').
  4498.  
  4499. The defaults for the line and point types is the index.  The defaults for
  4500. the width and size are both unity.
  4501.  
  4502. Linestyles created by this mechanism do not replace the default styles;
  4503. both may be used.
  4504.  
  4505. Not all terminals support the line width and point size features, so these
  4506. terminals obviously cannot fully support \fBset linestyle\fR.
  4507.  
  4508. Note that this feature is not completely installed; linestyles defined by
  4509. this mechanism may be used with \&'plot\&', \&'splot\&', \&'replot\&', and \&'set arrow\&',
  4510. but not by other commands that allow the default index to be used, such as
  4511. \&\&'set grid\&'.
  4512.  
  4513. Example:
  4514. Suppose that the default lines for indices 1, 2, and 3 are red, green, and
  4515. blue, respectively, and the default point shapes for the same indices are a
  4516. square, a cross, and a triangle, respectively.  Then
  4517.  
  4518. .br
  4519.       set linestyle 1 lt 2 lw 2 pt 3 ps 0.5
  4520. .br
  4521.  
  4522. defines a new linestyle that is green and twice the default width and a new
  4523. pointstyle that is a half-sized triangle.  The commands
  4524.  
  4525. .br
  4526.       set function style lines
  4527. .br
  4528. .br
  4529.       plot f(x) lt 3, g(x) ls 1
  4530. .br
  4531.  
  4532. will create a plot of f(x) using the default blue line and a plot of g(x)
  4533. using the user-defined wide green line.  Similarly the commands
  4534.  
  4535. .br
  4536.       set function style linespoints
  4537. .br
  4538. .br
  4539.       plot p(x) lt 1 pt 3, q(x) ls 1
  4540. .br
  4541.  
  4542. will create a plot of f(x) using the default triangles connected by a red
  4543. line and q(x) using small triangles connected by a green line.
  4544. .sp 2
  4545. .NH 2
  4546. Lmargin
  4547. .sp 1
  4548. .LP
  4549. .XS
  4550. Lmargin
  4551. .XE
  4552. The command \fBset lmargin\fR sets the size of the left margin.  Please see
  4553. \fBset margin\fR for details.
  4554. .sp 2
  4555. .NH 2
  4556. Locale
  4557. .sp 1
  4558. .LP
  4559. .XS
  4560. Locale
  4561. .XE
  4562. The \fBlocale\fR setting determines the language with which \fB{x,y,z}{d,m}tics\fR
  4563. will write the days and months.
  4564.  
  4565. Syntax:
  4566. .br
  4567.       set locale {"<locale>"}
  4568. .br
  4569.  
  4570. <locale> may be any language designation acceptable to your installation.
  4571. See your system documentation for the available options.  The default value
  4572. is determined from the LANG environment variable.
  4573. .sp 2
  4574. .NH 2
  4575. Logscale
  4576. .sp 1
  4577. .LP
  4578. .XS
  4579. Logscale
  4580. .XE
  4581. Log scaling may be set on the x, y, z, x2 and/or y2 axes.
  4582.  
  4583. Syntax:
  4584. .br
  4585.       set logscale <axes> <base>
  4586. .br
  4587. .br
  4588.       set nologscale <axes>
  4589. .br
  4590. .br
  4591.       show logscale
  4592. .br
  4593.  
  4594. where <axes> may be any combinations of \fBx\fR, \fBy\fR, and \fBz\fR, in any order, or
  4595. \fBx2\fR or \fBy2\fR and where <base> is the base of the log scaling.  If <base> is
  4596. not given, then 10 is assumed.  If <axes> is not given, then all axes are
  4597. assumed.  \fBset nologscale\fR turns off log scaling for the specified axes.
  4598.  
  4599. Examples:
  4600.  
  4601. To enable log scaling in both x and z axes:
  4602. .br
  4603.       set logscale xz
  4604. .br
  4605.  
  4606. To enable scaling log base 2 of the y axis:
  4607. .br
  4608.       set logscale y 2
  4609. .br
  4610.  
  4611. To disable z axis log scaling:
  4612. .br
  4613.       set nologscale z
  4614. .br
  4615. .sp 2
  4616. .NH 2
  4617. Mapping
  4618. .sp 1
  4619. .LP
  4620. .XS
  4621. Mapping
  4622. .XE
  4623. If data are provided to \fBsplot\fR in spherical or cylindrical coordinates,
  4624. the \fBset mapping\fR command should be used to instruct \fBgnuplot\fR how to
  4625. interpret them.
  4626.  
  4627. Syntax:
  4628. .br
  4629.       set mapping {cartesian | spherical | cylindrical}
  4630. .br
  4631.  
  4632. A cartesian coordinate system is used by default.
  4633.  
  4634. For a spherical coordinate system, the data occupy two or three columns (or
  4635. \fBusing\fR entries).  The first two are interpreted as the polar and azimuthal
  4636. angles theta and phi (in the units specified by \fBset angles\fR).  The radius r
  4637. is taken from the third column if there is one, or is set to unity if there
  4638. is no third column.  The mapping is:
  4639.  
  4640. .br
  4641.       x = r * cos(theta) * cos(phi)
  4642. .br
  4643. .br
  4644.       y = r * sin(theta) * cos(phi)
  4645. .br
  4646. .br
  4647.       z = r * sin(phi)
  4648. .br
  4649.  
  4650. Note that this is a "geographic" spherical system, rather than a "polar" one.
  4651.  
  4652. For a cylindrical coordinate system, the data again occupy two or three
  4653. columns.  The first two are interpreted as theta (in the units specified by
  4654. \fBset angles\fR) and z.  The radius is either taken from the third column or set
  4655. to unity, as in the spherical case.  The mapping is:
  4656.  
  4657. .br
  4658.       x = r * cos(theta)
  4659. .br
  4660. .br
  4661.       y = r * sin(theta)
  4662. .br
  4663. .br
  4664.       z = z
  4665. .br
  4666.  
  4667. The effects of \fBmapping\fR can be duplicated with the \fBusing\fR filter on the
  4668. \fBsplot\fR command, but \fBmapping\fR may be more convenient if many data files are
  4669. to be processed.  However even if \fBmapping\fR is used, \fBusing\fR may still be
  4670. necessary if the data in the file are not in the required order.
  4671.  
  4672. \fBmapping\fR has no effect on \fBplot\fRs.
  4673. .sp 2
  4674. .NH 2
  4675. Margin
  4676. .sp 1
  4677. .LP
  4678. .XS
  4679. Margin
  4680. .XE
  4681. Normally the margins of the plot are automatically calculated based on tics
  4682. and axis labels.  These computed values can be overridden by the \fBset margin\fR
  4683. commands.  \fBshow margin\fR shows the current settings.
  4684.  
  4685. Syntax:
  4686. .br
  4687.       set bmargin {<margin>}
  4688. .br
  4689. .br
  4690.       set lmargin {<margin>}
  4691. .br
  4692. .br
  4693.       set rmargin {<margin>}
  4694. .br
  4695. .br
  4696.       set tmargin {<margin>}
  4697. .br
  4698. .br
  4699.       show margin
  4700. .br
  4701.  
  4702. The units of <margin> are character heights or widths, as appropriate.  A
  4703. positive value defines the absolute size of the margin.  A negative value (or
  4704. none) causes \fBgnuplot\fR to revert to the computed value.
  4705. .sp 2
  4706. .NH 2
  4707. Missing
  4708. .sp 1
  4709. .LP
  4710. .XS
  4711. Missing
  4712. .XE
  4713. The \fBset missing\fR command allows you to tell \fBgnuplot\fR what character is
  4714. used in a data file to denote missing data.
  4715.  
  4716. Syntax:
  4717. .br
  4718.       set missing {"<character>"}
  4719. .br
  4720. .br
  4721.       show missing
  4722. .br
  4723.  
  4724. Example:
  4725. .br
  4726.       set missing "?"
  4727. .br
  4728.  
  4729. would mean that, when plotting a file containing
  4730.  
  4731. .br
  4732.          1 1
  4733. .br
  4734. .br
  4735.          2 ?
  4736. .br
  4737. .br
  4738.          3 2
  4739. .br
  4740.  
  4741. the middle line would be ignored.
  4742.  
  4743. There is no default character for \fBmissing\fR.
  4744. .sp 2
  4745. .NH 2
  4746. Multiplot
  4747. .sp 1
  4748. .LP
  4749. .XS
  4750. Multiplot
  4751. .XE
  4752. The command \fBset multiplot\fR places \fBgnuplot\fR in the multiplot mode, in which
  4753. several plots are placed on the same page, window, or screen.
  4754.  
  4755. Syntax:
  4756. .br
  4757.       set multiplot
  4758. .br
  4759. .br
  4760.       set nomultiplot
  4761. .br
  4762.  
  4763. For some terminals, no plot is displayed until the command \fBset nomultiplot\fR
  4764. is given, which causes the entire page to be drawn and then returns \fBgnuplot\fR
  4765. to its normal single-plot mode.  For other terminals, each separate \fBplot\fR
  4766. command produces a plot, but the screen may not be cleared between plots.
  4767.  
  4768. Any labels or arrows that have been defined will be drawn for each plot
  4769. according to the current size and origin (unless their coordinates are
  4770. defined in the \fBscreen\fR system).  Just about everything else that can be
  4771. \fBset\fR is applied to each plot, too.  If you want something to appear only
  4772. once on the page, for instance a single time stamp, you\&'ll need to put a \fBset
  4773. time\fR/\fBset notime\fR pair around one of the \fBplot\fR, \fBsplot\fR or \fBreplot\fR
  4774. commands within the \fBset multiplot\fR/\fBset nomultiplot\fR block.
  4775.  
  4776. The commands \fBset origin\fR and \fBset size\fR must be used to correctly position
  4777. each plot; see \fBset origin\fR and \fBset size\fR for details of their usage.
  4778.  
  4779. Example:
  4780. .br
  4781.       set size 0.7,0.7
  4782. .br
  4783. .br
  4784.       set origin 0.1,0.1
  4785. .br
  4786. .br
  4787.       set multiplot
  4788. .br
  4789. .br
  4790.       set size 0.4,0.4
  4791. .br
  4792. .br
  4793.       set origin 0.1,0.1
  4794. .br
  4795. .br
  4796.       plot sin(x)
  4797. .br
  4798. .br
  4799.       set size 0.2,0.2
  4800. .br
  4801. .br
  4802.       set origin 0.5,0.5
  4803. .br
  4804. .br
  4805.       plot cos(x)
  4806. .br
  4807. .br
  4808.       set nomultiplot
  4809. .br
  4810.  
  4811. displays a plot of cos(x) stacked above a plot of sin(x).  Note the initial
  4812. \fBset size\fR and \fBset origin\fR.  While these are not always required, their
  4813. inclusion is recommended.  Some terminal drivers require that bounding box
  4814. information be available before any plots can be made, and the form given
  4815. above guarantees that the bounding box will include the entire plot array
  4816. rather than just the bounding box of the first plot.
  4817.  
  4818. \fBset size\fR and \fBset origin\fR refer to the entire plotting area used for each
  4819. plot.  If you want to have the axes themselves line up, perhaps to avoid
  4820. having to label all of them, you need to guarantee that the margins are the
  4821. same size.  This can be done with the \fBset margin\fR commands.  Please see \fBset
  4822. margin\fR for their use.
  4823. .sp 2
  4824. .NH 2
  4825. Mx2tics
  4826. .sp 1
  4827. .LP
  4828. .XS
  4829. Mx2tics
  4830. .XE
  4831. Minor tic marks along the x2 (top) axis are controlled by \fBset mx2tics\fR.
  4832. Please see \fBset mxtics\fR.
  4833. .sp 2
  4834. .NH 2
  4835. Mxtics
  4836. .sp 1
  4837. .LP
  4838. .XS
  4839. Mxtics
  4840. .XE
  4841. Minor tic marks along the x axis are controlled by \fBset mxtics\fR.  They can be
  4842. turned off with \fBset nomxtics\fR.  Similar commands control minor tics along
  4843. the other axes.
  4844.  
  4845. Syntax:
  4846. .br
  4847.       set mxtics {<freq> | default}
  4848. .br
  4849. .br
  4850.       set nomxtics
  4851. .br
  4852. .br
  4853.       show mxtics
  4854. .br
  4855.  
  4856. The same syntax applies to \fBmytics\fR, \fBmztics\fR, \fBmx2tics\fR and \fBmy2tics\fR.
  4857.  
  4858. <freq> is the number of sub-intervals (NOT the number of minor tics) between
  4859. major tics (ten is the default for a linear axis, so there are nine minor
  4860. tics between major tics). Selecting \fBdefault\fR will return the number of minor
  4861. ticks to its default value.
  4862.  
  4863. If the axis is logarithmic, the number of sub-intervals will be set to a
  4864. reasonable number by default (based upon the length of a decade).  This will
  4865. be overridden if <freq> is given.  However the usual minor tics (2, 3, ...,
  4866. 8, 9 between 1 and 10, for example) are obtained by setting <freq> to 10,
  4867. even though there are but nine sub-intervals.
  4868.  
  4869. Minor tics can be used only with uniformly spaced major tics.  Since major
  4870. tics can be placed arbitrarily by \fBset {x|x2|y|y2|z}tics\fR, minor tics cannot
  4871. be used if major tics are explicitly \fBset\fR.
  4872.  
  4873. By default, minor tics are off for linear axes and on for logarithmic axes.
  4874. They inherit the settings for \fBaxis|border\fR and \fB{no}mirror\fR specified for
  4875. the major tics.  Please see \fBset xtics\fR for information about these.
  4876. .sp 2
  4877. .NH 2
  4878. My2tics
  4879. .sp 1
  4880. .LP
  4881. .XS
  4882. My2tics
  4883. .XE
  4884. Minor tic marks along the y2 (right-hand) axis are controlled by \fBset
  4885. my2tics\fR.  Please see \fBset mxtics\fR.
  4886. .sp 2
  4887. .NH 2
  4888. Mytics
  4889. .sp 1
  4890. .LP
  4891. .XS
  4892. Mytics
  4893. .XE
  4894. Minor tic marks along the y axis are controlled by \fBset mytics\fR.  Please
  4895. see \fBset mxtics\fR.
  4896. .sp 2
  4897. .NH 2
  4898. Mztics
  4899. .sp 1
  4900. .LP
  4901. .XS
  4902. Mztics
  4903. .XE
  4904. Minor tic marks along the z axis are controlled by \fBset mztics\fR.  Please
  4905. see \fBset mxtics\fR.
  4906. .sp 2
  4907. .NH 2
  4908. Offsets
  4909. .sp 1
  4910. .LP
  4911. .XS
  4912. Offsets
  4913. .XE
  4914. Offsets provide a mechanism to put a boundary around the data inside of an
  4915. autoscaled graph.
  4916.  
  4917. Syntax:
  4918. .br
  4919.       set offsets <left>, <right>, <top>, <bottom>
  4920. .br
  4921. .br
  4922.       set nooffsets
  4923. .br
  4924. .br
  4925.       show offsets
  4926. .br
  4927.  
  4928. Each offset may be a constant or an expression.  Each defaults to 0.  Left
  4929. and right offsets are given in units of the x axis, top and bottom offsets in
  4930. units of the y axis.  A positive offset expands the graph in the specified
  4931. direction, e.g., a positive bottom offset makes ymin more negative.  Negative
  4932. offsets, while permitted, can have unexpected interactions with autoscaling
  4933. and clipping.
  4934.  
  4935. Offsets are ignored in \fBsplot\fRs.
  4936.  
  4937. Example:
  4938. .br
  4939.       set offsets 0, 0, 2, 2
  4940. .br
  4941. .br
  4942.       plot sin(x)
  4943. .br
  4944.  
  4945. This graph of sin(x) will have a y range [-3:3] because the function
  4946. will be autoscaled to [-1:1] and the vertical offsets are each two.
  4947. .sp 2
  4948. .NH 2
  4949. Origin
  4950. .sp 1
  4951. .LP
  4952. .XS
  4953. Origin
  4954. .XE
  4955. The \fBset origin\fR command is used to specify the origin of a plotting surface
  4956. (i.e., the graph and its margins) on the screen.  The coordinates are given
  4957. in the \fBscreen\fR coordinate system (see \fBcoordinates\fR for information about
  4958. this system).
  4959.  
  4960. Syntax:
  4961. .br
  4962.       set origin <x-origin>,<y-origin>
  4963. .br
  4964. .sp 2
  4965. .NH 2
  4966. Output
  4967. .sp 1
  4968. .LP
  4969. .XS
  4970. Output
  4971. .XE
  4972. By default, screens are displayed to the standard output. The \fBset output\fR
  4973. command redirects the display to the specified file or device.
  4974.  
  4975. Syntax:
  4976. .br
  4977.       set output {"<filename>"}
  4978. .br
  4979. .br
  4980.       show output
  4981. .br
  4982.  
  4983. The filename must be enclosed in quotes.  If the filename is omitted, any
  4984. output file opened by a previous invocation of \fBset output\fR will be closed
  4985. and new output will be sent to STDOUT.  (If you give the command \fBset output
  4986. "STDOUT"\fR, your output may be sent to a file named "STDOUT"!  ["May be", not
  4987. "will be", because some terminals, like \fBx11\fR, ignore \fBset output\fR.])
  4988.  
  4989. MSDOS users should note that the \\ character has special significance in
  4990. double-quoted strings, so single-quotes should be used for filenames in
  4991. different directories.
  4992.  
  4993. When both \fBset terminal\fR and \fBset output\fR are used together, it is safest to
  4994. give \fBset terminal\fR first, because some terminals set a flag which is needed
  4995. in some operating systems.  This would be the case, for example, if the
  4996. operating system needs to know whether or not a file is to be formatted in
  4997. order to open it properly.
  4998.  
  4999. On machines with popen functions (Unix), output can be piped through a shell
  5000. command if the first character of the filename is \&'|\&'.  For instance,
  5001.  
  5002. .br
  5003.       set output "|lpr -Plaser filename"
  5004. .br
  5005. .br
  5006.       set output "|lp -dlaser filename"
  5007. .br
  5008.  
  5009. On MSDOS machines, \fBset output "PRN"\fR will direct the output to the default
  5010. printer.  On VMS, output can be sent directly to any spooled device.  It is
  5011. also possible to send the output to DECnet transparent tasks, which allows
  5012. some flexibility.
  5013. .sp 2
  5014. .NH 2
  5015. Parametric
  5016. .sp 1
  5017. .LP
  5018. .XS
  5019. Parametric
  5020. .XE
  5021. The \fBset parametric\fR command changes the meaning of \fBplot\fR (\fBsplot\fR) from
  5022. normal functions to parametric functions.  The command \fBset noparametric\fR
  5023. restores the plotting style to normal, single-valued expression plotting.
  5024.  
  5025. Syntax:
  5026. .br
  5027.       set parametric
  5028. .br
  5029. .br
  5030.       set noparametric
  5031. .br
  5032. .br
  5033.       show parametric
  5034. .br
  5035.  
  5036. For 2-d plotting, a parametric function is determined by a pair of parametric
  5037. functions operating on a parameter.  An example of a 2-d parametric function
  5038. would be \fBplot sin(t),cos(t)\fR, which draws a circle (if the aspect ratio is
  5039. set correctly---see \fBset size\fR).  \fBgnuplot\fR will display an error message if
  5040. both functions are not provided for a parametric \fBplot\fR.
  5041.  
  5042. For 3-d plotting, the surface is described as x=f(u,v), y=g(u,v), z=h(u,v).
  5043. Therefore a triplet of functions is required.  An example of a 3-d parametric
  5044. function would be \fBcos(u)*cos(v),cos(u)*sin(v),sin(u)\fR, which draws a sphere.
  5045. \fBgnuplot\fR will display an error message if all three functions are not
  5046. provided for a parametric \fBsplot\fR.
  5047.  
  5048. The total set of possible plots is a superset of the simple f(x) style plots,
  5049. since the two functions can describe the x and y values to be computed
  5050. separately.  In fact, plots of the type t,f(t) are equivalent to those
  5051. produced with f(x) because the x values are computed using the identity
  5052. function.  Similarly, 3-d plots of the type u,v,f(u,v) are equivalent to
  5053. f(x,y).
  5054.  
  5055. Note that the order the parametric functions are specified is xfunction,
  5056. yfunction (and zfunction) and that each operates over the common parametric
  5057. domain.
  5058.  
  5059. Also, the \fBset parametric\fR function implies a new range of values.  Whereas
  5060. the normal f(x) and f(x,y) style plotting assume an xrange and yrange (and
  5061. zrange), the parametric mode additionally specifies a trange, urange, and
  5062. vrange.  These ranges may be set directly with \fBset trange\fR, \fBset urange\fR,
  5063. and \fBset vrange\fR, or by specifying the range on the \fBplot\fR or \fBsplot\fR
  5064. commands.  Currently the default range for these parametric variables is
  5065. [-5:5].  Setting the ranges to something more meaningful is expected.
  5066. .sp 2
  5067. .NH 2
  5068. Pointsize
  5069. .sp 1
  5070. .LP
  5071. .XS
  5072. Pointsize
  5073. .XE
  5074. The \fBset pointsize\fR command changes the size of the points used in plots.
  5075.  
  5076. Syntax:
  5077. .br
  5078.       set pointsize <pointsize>
  5079. .br
  5080. .br
  5081.       show pointsize
  5082. .br
  5083.  
  5084. Default is pointsize 1.0.  Larger pointsizes (>1.0) are useful for high
  5085. resolution in bitmapped graphics.
  5086.  
  5087. The pointsize of a single plot may be changed on the \fBplot\fR command.  See
  5088. \fBplot with\fR for details.
  5089.  
  5090. Please note that the pointsize setting is not supported with all terminal
  5091. types.
  5092. .sp 2
  5093. .NH 2
  5094. Polar
  5095. .sp 1
  5096. .LP
  5097. .XS
  5098. Polar
  5099. .XE
  5100. The \fBset polar\fR command changes the meaning of the plot from rectangular
  5101. coordinates to polar coordinates.
  5102.  
  5103. Syntax:
  5104. .br
  5105.       set polar
  5106. .br
  5107. .br
  5108.       set nopolar
  5109. .br
  5110. .br
  5111.       show polar
  5112. .br
  5113.  
  5114. There have been changes made to polar mode in version 3.6, so that scripts
  5115. for \fBgnuplot\fR versions 3.5 and earlier will require modification.  The main
  5116. change is that the dummy variable t is used for the angle so that the x and
  5117. y ranges can be controlled independently.  Other changes are:
  5118. 1) tics are no longer put along the zero axes automatically
  5119. ---use \fBset xtics axis nomirror\fR; \fBset ytics axis nomirror\fR;
  5120. 2) the grid, if selected, is not automatically polar
  5121. ---use \fBset grid polar\fR;
  5122. 3) the grid is not labelled with angles
  5123. ---use \fBset label\fR as necessary.
  5124.  
  5125. In polar coordinates, the dummy variable (t) is an angle.  The default range
  5126. of t is [0:2*pi], or, if degree units have been selected, to [0:360] (see
  5127. \fBset angles\fR).
  5128.  
  5129. The command \fBset nopolar\fR changes the meaning of the plot back to the default
  5130. rectangular coordinate system.
  5131.  
  5132. The \fBset polar\fR command is not supported for \fBsplot\fRs.  See the \fBset mapping\fR
  5133. command for similar functionality for \fBsplot\fRs.
  5134.  
  5135. While in polar coordinates the meaning of an expression in t is really
  5136. r = f(t), where t is an angle of rotation.  The trange controls the domain
  5137. (the angle) of the function, and the x and y ranges control the range of the
  5138. graph in the x and y directions.  Each of these ranges, as well as the
  5139. rrange, may be autoscaled or set explicitly.  See \fBset xrange\fR for details
  5140. of all the \fBset range\fR commands.
  5141.  
  5142. Example:
  5143. .br
  5144.       set polar
  5145. .br
  5146. .br
  5147.       plot t*sin(t)
  5148. .br
  5149. .br
  5150.       plot [-2*pi:2*pi] [-3:3] [-3:3] t*sin(t)
  5151. .br
  5152.  
  5153. The first \fBplot\fR uses the default polar angular domain of 0 to 2*pi.  The
  5154. radius and the size of the graph are scaled automatically.  The second \fBplot\fR
  5155. expands the domain, and restricts the size of the graph to [-3:3] in both
  5156. directions.
  5157.  
  5158. You may want to \fBset size square\fR to have \fBgnuplot\fR try to make the aspect
  5159. ratio equal to unity, so that circles look circular.
  5160. .sp 2
  5161. .NH 2
  5162. Rmargin
  5163. .sp 1
  5164. .LP
  5165. .XS
  5166. Rmargin
  5167. .XE
  5168. The command \fBset rmargin\fR sets the size of the right margin.  Please see
  5169. \fBset margin\fR for details.
  5170. .sp 2
  5171. .NH 2
  5172. Rrange
  5173. .sp 1
  5174. .LP
  5175. .XS
  5176. Rrange
  5177. .XE
  5178. The \fBset rrange\fR command sets the range of the radial coordinate for a
  5179. graph in polar mode.  Please see \fBset xrange\fR for details.
  5180. .sp 2
  5181. .NH 2
  5182. Samples
  5183. .sp 1
  5184. .LP
  5185. .XS
  5186. Samples
  5187. .XE
  5188. The sampling rate of functions may be changed by the \fBset samples\fR command.
  5189.  
  5190. Syntax:
  5191. .br
  5192.       set samples <samples_1> {,<samples_2>}
  5193. .br
  5194. .br
  5195.       show samples
  5196. .br
  5197.  
  5198. By default, sampling is set to 100 points.  A higher sampling rate will
  5199. produce more accurate plots, but will take longer.  This parameter has no
  5200. effect on data-file plotting unless one of the \fBsmooth\fR options is used.
  5201.  
  5202. When a 2-d graph is being done, only the value of <samples_1> is relevant.
  5203.  
  5204. When a surface plot is being done without the removal of hidden lines, the
  5205. value of samples specifies the number of samples that are to be evaluated for
  5206. isoline.  Each iso-v line will have <sample_1> samples and each iso-u line
  5207. will have <sample_2> samples.  If you only specify <samples_1>, <samples_2>
  5208. will be set to the same value as <samples_1>.  See also \fBset isosamples\fR.
  5209. .sp 2
  5210. .NH 2
  5211. Size
  5212. .sp 1
  5213. .LP
  5214. .XS
  5215. Size
  5216. .XE
  5217. The \fBset size\fR command scales the displayed size of the plot.
  5218.  
  5219. Syntax:
  5220. .br
  5221.       set size {{no}square | ratio <r> | noratio} {<xscale>,<yscale>}
  5222. .br
  5223. .br
  5224.       show size
  5225. .br
  5226.  
  5227. The <xscale> and <yscale> values are the scaling factors for the size of the
  5228. plot, which includes the graph and the margins.
  5229.  
  5230. \fBratio\fR causes \fBgnuplot\fR to try to create a graph with an aspect ratio of <r>
  5231. (the ratio of the y-axis length to the x-axis length) within the portion of
  5232. the plot specified by <xscale> and <yscale>.
  5233.  
  5234. The meaning of a negative value for <r> is different.  If <r>=-1, gnuplot
  5235. tries to set the scales so that the unit has the same length on both the x
  5236. and y axes (suitable for geographical data, for instance).  If <r>=-2, the
  5237. unit on y has twice the length of the unit on x, and so on.
  5238.  
  5239. The success of \fBgnuplot\fR in producing the requested aspect ratio depends on
  5240. the terminal selected.  The graph area will be the largest rectangle of
  5241. aspect ratio <r> that will fit into the specified portion of the output
  5242. (leaving adequate margins, of course).
  5243.  
  5244. \fBsquare\fR is a synonym for \fBratio 1\fR.
  5245.  
  5246. Both \fBnoratio\fR and \fBnosquare\fR return the graph to its default aspect ratio
  5247. (1.0), but do not return <xscale> or <yscale> to their default values (also
  5248. 1.0).
  5249.  
  5250. \fBratio\fR and \fBsquare\fR have no effect on 3-d plots.
  5251.  
  5252. \fBset size\fR is relative to the default size, which differs from terminal to
  5253. terminal.  Since \fBgnuplot\fR fills as much of the available plotting area as
  5254. possible by default, it is safer to use \fBset size\fR to decrease the size of
  5255. a plot than to increase it.  See \fBset terminal\fR for the default sizes.
  5256.  
  5257. On some terminals, changing the size of the plot will result in text being
  5258. misplaced.
  5259.  
  5260. Examples:
  5261.  
  5262. To set the size to normal size use:
  5263. .br
  5264.       set size 1,1
  5265. .br
  5266.  
  5267. To make the graph half size and square use:
  5268. .br
  5269.       set size square 0.5,0.5
  5270. .br
  5271.  
  5272. To make the graph twice as high as wide use:
  5273. .br
  5274.       set size ratio 2
  5275. .br
  5276.  
  5277. .sp 2
  5278. .NH 2
  5279. Style
  5280. .sp 1
  5281. .LP
  5282. .XS
  5283. Style
  5284. .XE
  5285. Default styles are chosen with the \fBset function style\fR and \fBset data style\fR
  5286. commands.  See \fBplot with\fR for information about how to override the default
  5287. plotting style for individual functions and data sets.
  5288.  
  5289. Syntax:
  5290. .br
  5291.       set function style <style>
  5292. .br
  5293. .br
  5294.       set data style <style>
  5295. .br
  5296. .br
  5297.       show function style
  5298. .br
  5299. .br
  5300.       show data style
  5301. .br
  5302.  
  5303. The types used for all line and point styles (i.e., solid, dash-dot, color,
  5304. etc. for lines; circles, squares, crosses, etc. for points) will be either
  5305. those specified on the \fBplot\fR or \fBsplot\fR command or will be chosen
  5306. sequentially from the types available to the terminal in use.  Use the
  5307. command \fBtest\fR to see what is available.
  5308.  
  5309. None of the styles requiring more than two columns of information (e.g.,
  5310. \fBerrorbars\fR) can be used with \fBsplot\fRs or function \fBplot\fRs.  Neither \fBboxes\fR
  5311. nor any of the \fBsteps\fR styles can be used with \fBsplot\fRs.  If an inappropriate
  5312. style is specified, it will be changed to \fBpoints\fR.
  5313.  
  5314. For 2-d data with more than two columns, \fBgnuplot\fR is picky about the allowed
  5315. \fBerrorbar\fR styles.  The \fBusing\fR option on the \fBplot\fR command can be used to
  5316. set up the correct columns for the style you want.  (In this discussion,
  5317. "column" will be used to refer both to a column in the data file and an entry
  5318. in the \fBusing\fR list.)
  5319.  
  5320. For three columns, only \fBxerrorbars\fR, \fByerrorbars\fR (or \fBerrorbars\fR), \fBboxes\fR,
  5321. and \fBboxerrorbars\fR are allowed.  If another plot style is used, the style
  5322. will be changed to \fByerrorbars\fR.  The \fBboxerrorbars\fR style will calculate the
  5323. boxwidth automatically.
  5324.  
  5325. For four columns, only \fBxerrorbars\fR, \fByerrorbars\fR (or \fBerrorbars\fR),
  5326. \fBxyerrorbars\fR, \fBboxxyerrorbars\fR, and \fBboxerrorbars\fR are allowed.  An illegal
  5327. style will be changed to \fByerrorbars\fR.
  5328.  
  5329. Five-column data allow only the \fBboxerrorbars\fR, \fBfinancebars\fR, and
  5330. \fBcandlesticks\fR styles.  (The last two of these are primarily used for plots
  5331. of financial prices.)  An illegal style will be changed to \fBboxerrorbars\fR
  5332. before plotting.
  5333.  
  5334. Six- and seven-column data only allow the \fBxyerrorbars\fR and \fBboxxyerrorbars\fR
  5335. styles.  Illegal styles will be changed to \fBxyerrorbars\fR before plotting.
  5336.  
  5337. For more information about error bars, please see \fBplot errorbars\fR.
  5338. .sp 2
  5339. .RS
  5340. .IP
  5341. .NH 3
  5342. Boxerrorbars
  5343. .sp 1
  5344. .LP
  5345. .XS
  5346. Boxerrorbars
  5347. .XE
  5348. The \fBboxerrorbars\fR style is only relevant to 2-d data plotting.  It is a
  5349. combination of the \fBboxes\fR and \fByerrorbars\fR styles.  The boxwidth will come
  5350. from the fourth column if the y errors are in the form of "ydelta" and the
  5351. boxwidth was not previously set equal to -2.0 (\fBset boxwidth -2.0\fR) or from
  5352. the fifth column if the y errors are in the form of "ylow yhigh".  The
  5353. special case  \fBboxwidth = -2.0\fR is for four-column data with y errors in the
  5354. form "ylow yhigh".  In this case the boxwidth will be calculated so that each
  5355. box touches the adjacent boxes.  The width will also be calculated in cases
  5356. where three-column data are used.
  5357.  
  5358. The box height is determined from the y error in the same way as it is for
  5359. the \fByerrorbars\fR style---either from y-ydelta to y+ydelta or from ylow to
  5360. yhigh, depending on how many data columns are provided.
  5361. .sp 2
  5362. .NH 3
  5363. Boxes
  5364. .sp 1
  5365. .LP
  5366. .XS
  5367. Boxes
  5368. .XE
  5369. The \fBboxes\fR style is only relevant to 2-d plotting.  It draws a box centered
  5370. about the given x coordinate from the x axis (not the graph border) to the
  5371. given y coordinate.  The width of the box is obtained in one of three ways.
  5372. If it is a data plot and the data file has a third column, this will be used
  5373. to set the width of the box.  If not, if a width has been set using the \fBset
  5374. boxwidth\fR command, this will be used.  If neither of these is available, the
  5375. width of each box will be calculated automatically so that it touches the
  5376. adjacent boxes.
  5377. .sp 2
  5378. .NH 3
  5379. Boxxyerrorbars
  5380. .sp 1
  5381. .LP
  5382. .XS
  5383. Boxxyerrorbars
  5384. .XE
  5385. The \fBboxxyerrorbars\fR style is only relevant to 2-d data plotting.  It is a
  5386. combination of the \fBboxes\fR and \fBxyerrorbars\fR styles.
  5387.  
  5388. The box width and height are determined from the x and y errors in the same
  5389. way as they are for the \fBxyerrorbars\fR style---either from xlow to xhigh and
  5390. from ylow to yhigh, or from x-xdelta to x+xdelta and from y-ydelta to
  5391. y+ydelta , depending on how many data columns are provided.
  5392. .sp 2
  5393. .NH 3
  5394. Candlesticks
  5395. .sp 1
  5396. .LP
  5397. .XS
  5398. Candlesticks
  5399. .XE
  5400. The \fBcandlesticks\fR style is only relevant for 2-d data plotting of financial
  5401. data.  Five columns of data are required; in order, these should be the x
  5402. coordinate (most likely a date) and the opening, low, high, and closing
  5403. prices.  The symbol is an open rectangle, centered horizontally at the x
  5404. coordinate and limited vertically by the opening and closing prices.  A
  5405. vertical line segment at the x coordinate extends up from the top of the
  5406. rectangle to the high price and another down to the low.  The width of the
  5407. rectangle may be changed by \fBset bar\fR.  The symbol will be unchanged if the
  5408. low and high prices are interchanged or if the opening and closing prices
  5409. are interchanged.  See \fBset bar\fR and \fBfinancebars\fR.
  5410. .sp 2
  5411. .NH 3
  5412. Dots
  5413. .sp 1
  5414. .LP
  5415. .XS
  5416. Dots
  5417. .XE
  5418. The \fBdots\fR style plots a tiny dot at each point; this is useful for scatter
  5419. plots with many points.
  5420. .sp 2
  5421. .NH 3
  5422. Financebars
  5423. .sp 1
  5424. .LP
  5425. .XS
  5426. Financebars
  5427. .XE
  5428. The \fBfinancebars\fR style is only relevant for 2-d data plotting of financial
  5429. data.  Five columns of data are required; in order, these should be the x
  5430. coordinate (most likely a date) and the opening, low, high, and closing
  5431. prices.  The symbol is a vertical line segment, located horizontally at the x
  5432. coordinate and limited vertically by the high and low prices.  A horizontal
  5433. tic on the left marks the opening price and one on the right marks the
  5434. closing price.  The length of these tics may be changed by \fBset bar\fR.  The
  5435. symbol will be unchanged if the high and low prices are interchanged.  See
  5436. \fBset bar\fR and \fBcandlesticks\fR.
  5437. .sp 2
  5438. .NH 3
  5439. Fsteps
  5440. .sp 1
  5441. .LP
  5442. .XS
  5443. Fsteps
  5444. .XE
  5445. The \fBfsteps\fR style is only relevant to 2-d plotting.  It connects consecutive
  5446. points with two line segments: the first from (x1,y1) to (x1,y2) and the
  5447. second from (x1,y2) to (x2,y2).
  5448. .sp 2
  5449. .NH 3
  5450. Histeps
  5451. .sp 1
  5452. .LP
  5453. .XS
  5454. Histeps
  5455. .XE
  5456. The \fBhisteps\fR style is only relevant to 2-d plotting.  It is intended for
  5457. plotting histograms.  Y-values are assumed to be centered at the x-values;
  5458. the point at x1 is represented as a horizontal line from ((x0+x1)/2,y1) to
  5459. ((x1+x2)/2,y1).  The lines representing the end points are extended so that
  5460. the step is centered on at x.  Adjacent points are connected by a vertical
  5461. line at their average x, that is, from ((x1+x2)/2,y1) to ((x1+x2)/2,y2).
  5462.  
  5463. If \fBautoscale\fR is in effect, it selects the xrange from the data rather than
  5464. the steps, so the end points will appear only half as wide as the others.
  5465.  
  5466. \fBhisteps\fR is only a plotting style; \fBgnuplot\fR does not have the ability to
  5467. create bins and determine their population from some data set.
  5468. .sp 2
  5469. .NH 3
  5470. Impulses
  5471. .sp 1
  5472. .LP
  5473. .XS
  5474. Impulses
  5475. .XE
  5476. The \fBimpulses\fR style displays a vertical line from the x axis (not the graph
  5477. border), or from the grid base for \fBsplot\fR, to each point.
  5478. .sp 2
  5479. .NH 3
  5480. Lines
  5481. .sp 1
  5482. .LP
  5483. .XS
  5484. Lines
  5485. .XE
  5486. The \fBlines\fR style connects adjacent points with straight line segments.
  5487. .sp 2
  5488. .NH 3
  5489. Linespoints
  5490. .sp 1
  5491. .LP
  5492. .XS
  5493. Linespoints
  5494. .XE
  5495. The \fBlinespoints\fR style does both \fBlines\fR and \fBpoints\fR, that is, it draws a
  5496. small symbol at each point and then connects adjacent points with straight
  5497. line segments.  The command \fBset pointsize\fR may be used to change the size of
  5498. the points.  See \fBset pointsize\fR for its usage.
  5499.  
  5500. \fBlinespoints\fR may be abbreviated \fBlp\fR.
  5501. .sp 2
  5502. .NH 3
  5503. Points
  5504. .sp 1
  5505. .LP
  5506. .XS
  5507. Points
  5508. .XE
  5509. The \fBpoints\fR style displays a small symbol at each point.  The command \fBset
  5510. pointsize\fR may be used to change the size of the points.  See \fBset pointsize\fR
  5511. for its usage.
  5512. .sp 2
  5513. .NH 3
  5514. Steps
  5515. .sp 1
  5516. .LP
  5517. .XS
  5518. Steps
  5519. .XE
  5520. The \fBsteps\fR style is only relevant to 2-d plotting.  It connects consecutive
  5521. points with two line segments: the first from (x1,y1) to (x2,y1) and the
  5522. second from (x2,y1) to (x2,y2).
  5523. .sp 2
  5524. .NH 3
  5525. Vector
  5526. .sp 1
  5527. .LP
  5528. .XS
  5529. Vector
  5530. .XE
  5531. The \fBvector\fR style draws a vector from (x,y) to (x+xdelta,y+ydelta).  Thus
  5532. it requires four columns of data.  It also draws a small arrowhead at the
  5533. end of the vector.
  5534.  
  5535. The \fBvector\fR style is still experimental: it doesn\&'t get clipped properly
  5536. and other things may also be wrong with it.  Use it at your own risk.
  5537. .sp 2
  5538. .NH 3
  5539. Xerrorbars
  5540. .sp 1
  5541. .LP
  5542. .XS
  5543. Xerrorbars
  5544. .XE
  5545. The \fBxerrorbars\fR style is only relevant to 2-d data plots.  \fBxerrorbars\fR is
  5546. like \fBdots\fR, except that a horizontal error bar is also drawn.  At each point
  5547. (x,y), a line is drawn from (xlow,y) to (xhigh,y) or from (x-xdelta,y) to
  5548. (x+xdelta,y), depending on how many data columns are provided.  A tic mark
  5549. is placed at the ends of the error bar (unless \fBset bar\fR is used---see \fBset
  5550. bar\fR for details).
  5551. .sp 2
  5552. .NH 3
  5553. Xyerrorbars
  5554. .sp 1
  5555. .LP
  5556. .XS
  5557. Xyerrorbars
  5558. .XE
  5559. The \fBxyerrorbars\fR style is only relevant to 2-d data plots.  \fBxyerrorbars\fR is
  5560. like \fBdots\fR, except that horizontal and vertical error bars are also drawn.
  5561. At each point (x,y), lines are drawn from (x,y-ydelta) to (x,y+ydelta) and
  5562. from (x-xdelta,y) to (x+xdelta,y) or from (x,ylow) to (x,yhigh) and from
  5563. (xlow,y) to (xhigh,y), depending upon the number of data columns provided.  A
  5564. tic mark is placed at the ends of the error bar (unless \fBset bar\fR is
  5565. used---see \fBset bar\fR for details).
  5566.  
  5567. If data are provided in an unsupported mixed form, the \fBusing\fR filter on the
  5568. \fBplot\fR command should be used to set up the appropriate form.  For example,
  5569. if the data are of the form (x,y,xdelta,ylow,yhigh), then you can use
  5570.  
  5571. .br
  5572.       plot 'data' using 1:2:($1-$3),($1+$3),4,5 with xyerrorbars
  5573. .br
  5574. .sp 2
  5575. .NH 3
  5576. Yerrorbars
  5577. .sp 1
  5578. .LP
  5579. .XS
  5580. Yerrorbars
  5581. .XE
  5582. The \fByerrorbars\fR (or \fBerrorbars\fR) style is only relevant to 2-d data plots.
  5583. \fByerrorbars\fR is like \fBdots\fR, except that a vertical error bar is also drawn.
  5584. At each point (x,y), a line is drawn from (x,y-ydelta) to (x,y+ydelta) or
  5585. from (x,ylow) to (x,yhigh), depending on how many data columns are provided.
  5586. A tic mark is placed at the ends of the error bar (unless \fBset bar\fR is
  5587. used---see \fBset bar\fR for details).
  5588. .sp 2
  5589. .RE
  5590. .br
  5591. .NH 2
  5592. Surface
  5593. .sp 1
  5594. .LP
  5595. .XS
  5596. Surface
  5597. .XE
  5598. The command \fBset surface\fR controls the display of surfaces, which are drawn
  5599. as a mesh of isolines.
  5600.  
  5601. Syntax:
  5602. .br
  5603.       set surface
  5604. .br
  5605. .br
  5606.       set nosurface
  5607. .br
  5608. .br
  5609.       show surface
  5610. .br
  5611.  
  5612. Whenever \fBset nosurface\fR is issued, no surface isolines/mesh will be drawn.
  5613. This is useful if contours are to be displayed by themselves.  See also \fBset
  5614. contour\fR.
  5615. .sp 2
  5616. .NH 2
  5617. Terminal
  5618. .sp 1
  5619. .LP
  5620. .XS
  5621. Terminal
  5622. .XE
  5623. \fBgnuplot\fR supports many different graphics devices.  Use \fBset terminal\fR to
  5624. tell \fBgnuplot\fR what kind of output to generate.
  5625.  
  5626. Syntax:
  5627. .br
  5628.       set terminal {<terminal-type>}
  5629. .br
  5630. .br
  5631.       show terminal
  5632. .br
  5633.  
  5634. If <terminal-type> is omitted, \fBgnuplot\fR will list the available terminal
  5635. types.  <terminal-type> may be abbreviated.
  5636.  
  5637. Use \fBset output\fR to redirect this output to a file or device.
  5638.  
  5639. If both \fBset terminal\fR and \fBset output\fR are used together, it is safest to
  5640. give \fBset terminal\fR first, because some terminals set a flag which is needed
  5641. in some operating systems.
  5642.  
  5643. Several terminals have additional options.  For example, see \fBdumb\fR,
  5644. \fBiris4d\fR, \fBhpljii\fR or \fBpostscript\fR.
  5645.  
  5646. This document may describe drivers that are not available to you because they
  5647. were not installed, or it may not describe all the drivers that are available
  5648. to you, depending on its output format.
  5649. .sp 2
  5650. .RS
  5651. .IP
  5652. .NH 3
  5653. Aed767
  5654. .sp 1
  5655. .LP
  5656. .XS
  5657. Aed767
  5658. .XE
  5659. The \fBaed512\fR and \fBaed767\fR terminal drivers support AED graphics terminals.
  5660. The two drivers differ only in their horizontal ranges, which are 512 and
  5661. 768 pixels, respectively.  Their vertical range is 575 pixels.  There are
  5662. no options for these drivers.
  5663. .sp 2
  5664. .NH 3
  5665. Aifm
  5666. .sp 1
  5667. .LP
  5668. .XS
  5669. Aifm
  5670. .XE
  5671. Several options may be set in \fBaifm\fR---the Adobe Illustrator 3.0+ driver.
  5672.  
  5673. Syntax:
  5674. .br
  5675.       set terminal aifm {<color>} {"<fontname>"} {<fontsize>}
  5676. .br
  5677.  
  5678. <color> is either \fBcolor\fR or \fBmonochrome\fR; "<fontname>" is the name of a
  5679. valid PostScript font; <fontsize> is the size of the font in PostScript
  5680. points, before scaling by the \fBset size\fR command.  Selecting \fBdefault\fR sets
  5681. all options to their default values: \fBmonochrome\fR, "Helvetica", and 14pt.
  5682.  
  5683. Since AI does not really support multiple pages, multiple graphs will be
  5684. drawn directly on top of one another.  However, each graph will be grouped
  5685. individually, making it easy to separate them inside AI (just pick them up
  5686. and move them).
  5687.  
  5688. Examples:
  5689. .br
  5690.       set term aifm
  5691. .br
  5692. .br
  5693.       set term aifm 22
  5694. .br
  5695. .br
  5696.       set size 0.7,1.4; set term aifm color "Times-Roman" 14
  5697. .br
  5698. .sp 2
  5699. .NH 3
  5700. Amiga
  5701. .sp 1
  5702. .LP
  5703. .XS
  5704. Amiga
  5705. .XE
  5706. The \fBamiga\fR terminal, for Commodore Amiga computers, allows the user to
  5707. select the font and its size.
  5708.  
  5709. Syntax:
  5710. .br
  5711.       set terminal amiga {"<fontname>"} {<fontsize>}
  5712. .br
  5713.  
  5714. The default font is 8-point "topaz".
  5715.  
  5716. This terminal uses a virtual screen, so it is possible that the graph will be
  5717. larger than the screen.
  5718. .sp 2
  5719. .NH 3
  5720. Apollo
  5721. .sp 1
  5722. .LP
  5723. .XS
  5724. Apollo
  5725. .XE
  5726. The \fBapollo\fR terminal driver supports the Apollo Graphics Primitive Resource
  5727. with rescaling after window resizing.  It has no options.
  5728.  
  5729. If a fixed-size window is used, the \fBgpr\fR terminal may be used instead.
  5730. .sp 2
  5731. .NH 3
  5732. Atari ST (via AES)
  5733. .sp 1
  5734. .LP
  5735. .XS
  5736. Atari ST (via AES)
  5737. .XE
  5738. The \fBatari\fR terminal has options to set the character size and the screen
  5739. colors.
  5740.  
  5741. Syntax:
  5742. .br
  5743.       set terminal atari {<fontsize>} {<col0> <col1> ... <col15.}
  5744. .br
  5745.  
  5746. The character size must appear if any colors are to be specified.  Each of
  5747. the (up to 16) colors is given as a three-digit hex number, where the digits
  5748. represent RED, GREEN and BLUE (in that order).  The range of 0--15 is scaled
  5749. to whatever color range the screen actually has.  On a normal ST screen, odd
  5750. and even intensities are the same.
  5751.  
  5752. Examples:
  5753. .br
  5754.       set terminal atari 4    # use small (6x6) font
  5755. .br
  5756. .br
  5757.       set terminal atari 6 0  # set monochrome screen to white on black
  5758. .br
  5759. .br
  5760.       set terminal atari 13 0 fff f00 f0 f ff f0f
  5761. .br
  5762. .br
  5763.                  # set first seven colors to black, white, green, blue,
  5764. .br
  5765. .br
  5766.                  # cyan, purple, and yellow and use large font (8x16).
  5767. .br
  5768.  
  5769. Additionally, if an environment variable GNUCOLORS exists, its contents are
  5770. interpreted as an options string, but an explicit terminal option takes
  5771. precedence.
  5772. .sp 2
  5773. .NH 3
  5774. Atari ST (via VDI)
  5775. .sp 1
  5776. .LP
  5777. .XS
  5778. Atari ST (via VDI)
  5779. .XE
  5780. The \fBvdi\fR terminal is the same as the \fBatari\fR terminal, except that it sends
  5781. output to the screen via the VDI and not into AES-Windows.
  5782.  
  5783. The \fBvdi\fR terminal has options to set the character size and the screen
  5784. colors.
  5785.  
  5786. Syntax:
  5787. .br
  5788.       set terminal vdi {<fontsize>} {<col0> <col1> ... <col15.}
  5789. .br
  5790.  
  5791. The character size must appear if any colors are to be specified.  Each of
  5792. the (up to 16) colors is given as a three-digit hex number, where the digits
  5793. represent RED, GREEN and BLUE (in that order).  The range of 0--15 is scaled
  5794. to whatever color range the screen actually has.  On a normal ST screen, odd
  5795. and even intensities are the same.
  5796.  
  5797. Examples:
  5798. .br
  5799.       set terminal vdi 4    # use small (6x6) font
  5800. .br
  5801. .br
  5802.       set terminal vdi 6 0  # set monochrome screen to white on black
  5803. .br
  5804. .br
  5805.       set terminal vdi 13 0 fff f00 f0 f ff f0f
  5806. .br
  5807. .br
  5808.                  # set first seven colors to black, white, green, blue,
  5809. .br
  5810. .br
  5811.                  # cyan, purple, and yellow and use large font (8x16).
  5812. .br
  5813.  
  5814. Additionally, if an environment variable GNUCOLORS exists, its contents are
  5815. interpreted as an options string, but an explicit terminal option takes
  5816. precedence.
  5817. .sp 2
  5818. .NH 3
  5819. Cgi
  5820. .sp 1
  5821. .LP
  5822. .XS
  5823. Cgi
  5824. .XE
  5825. The \fBcgi\fR and \fBhcgi\fR terminal drivers support SCO CGI drivers.  \fBhcgi\fR is for
  5826. printers; the environment variable CGIPRNT must be set.  \fBcgi\fR may be used
  5827. for either a display or hardcopy; if the environment variable CGIDISP is set,
  5828. then that display is used.  Otherwise CGIPRNT is used.
  5829. These terminals have no options.
  5830. .sp 2
  5831. .NH 3
  5832. Cgm
  5833. .sp 1
  5834. .LP
  5835. .XS
  5836. Cgm
  5837. .XE
  5838. The \fBcgm\fR terminal generates a Computer Graphics Metafile.  This file format
  5839. is a subset of the ANSI X3.122-1986 standard entitled "Computer Graphics -
  5840. Metafile for the Storage and Transfer of Picture Description Information".
  5841. Several options may be set in \fBcgm\fR.
  5842.  
  5843. Syntax:
  5844. .br
  5845.       set terminal cgm {<mode>} {<color>} {<rotation>}
  5846. .br
  5847. .br
  5848.                        {width <plot_width>} {linewidth <line_width>}
  5849. .br
  5850. .br
  5851.                        {"<font>"} {<fontsize>}
  5852. .br
  5853.  
  5854. where <mode> is \fBlandscape\fR, \fBportrait\fR, or \fBdefault\fR;
  5855. <color> is either \fBcolor\fR or \fBmonochrome\fR; 
  5856. <rotation> is either \fBrotate\fR or \fBnorotate\fR;
  5857. <plot_width> is the width of the page in points; 
  5858. <line_width> is the line width in points; 
  5859. <font> is the name of a font; and 
  5860. \fB<fontsize>\fR is the size of the font in points.
  5861.  
  5862. By default, \fBcgm\fR uses rotated text for the Y axis label.
  5863.  
  5864. The first five options can be in any order.  Selecting \fBdefault\fR sets all
  5865. options to their default values.
  5866.  
  5867. Examples:
  5868. .br
  5869.       set terminal cgm landscape color rotate width 432 linewidth 1 \\
  5870. .br
  5871. .br
  5872.                      'Arial Bold' 12                  # defaults
  5873. .br
  5874. .br
  5875.       set terminal cgm 14 linewidth 2  14  # wider lines & larger font
  5876. .br
  5877. .br
  5878.       set terminal cgm portrait 'Times Roman Italic' 12
  5879. .br
  5880. .sp 2
  5881. .RS
  5882. .IP
  5883. .NH 4
  5884. Font
  5885. .sp 1
  5886. .LP
  5887. .XS
  5888. Font
  5889. .XE
  5890. The first part of a Computer Graphics Metafile, the metafile description,
  5891. includes a font table.  In the picture body, a font is designated by an
  5892. index into this table.  By default, this terminal generates a table with
  5893. the following fonts:
  5894.  
  5895. .EQ
  5896. delim $$
  5897. .EN
  5898. .KS
  5899. .TS
  5900. center box tab (@) ;
  5901. c c l .
  5902. @@Arial
  5903. @@Arial Italic
  5904. @@Arial Bold
  5905. @@Arial Bold Italic
  5906. @@Times Roman
  5907. @@Times Roman Italic
  5908. @@Times Roman Bold
  5909. @@Times Roman Bold Italic
  5910. @@Helvetica
  5911. @@Roman
  5912. .TE
  5913. .KE
  5914. .EQ
  5915. delim off
  5916. .EN
  5917.  
  5918. Case is not distinct, but the modifiers must appear in the above order (that
  5919. is, not \&'Arial Italic Bold\&').  \&'Arial Bold\&' is the default font.
  5920.  
  5921. You may also specify a font name which does not appear in the default font
  5922. table.  In that case, a new font table is constructed with the specified
  5923. font as its only entry.  You must ensure that the spelling, capitalization,
  5924. and spacing of the name are appropriate for the application that will read
  5925. the CGM file.
  5926. .sp 2
  5927. .NH 4
  5928. Fontsize
  5929. .sp 1
  5930. .LP
  5931. .XS
  5932. Fontsize
  5933. .XE
  5934. Fonts are scaled assuming the page is 6 inches wide.  If the \fBsize\fR command
  5935. is used to change the aspect ratio of the page or the CGM file is converted
  5936. to a different width (e.g. it is imported into a document in which the
  5937. margins are not 6 inches apart), the resulting font sizes will be different.
  5938. To change the assumed width, use the \fBwidth\fR option.
  5939. .sp 2
  5940. .NH 4
  5941. Linewidth
  5942. .sp 1
  5943. .LP
  5944. .XS
  5945. Linewidth
  5946. .XE
  5947. The \fBlinewidth\fR option sets the width of lines in pt.  The default width is
  5948. 1 pt.  Scaling is affected by the actual width of the page, as discussed
  5949. under the \fBfontsize\fR and \fBwidth\fR options
  5950. .sp 2
  5951. .NH 4
  5952. Rotate
  5953. .sp 1
  5954. .LP
  5955. .XS
  5956. Rotate
  5957. .XE
  5958. The \fBnorotate\fR option may be used to disable text rotation.  For example,
  5959. the CGM input filter for Word for Windows 6.0c can accept rotated text, but
  5960. the DRAW editor within Word cannot.  If you edit a graph (for example, to
  5961. label a curve), all rotated text is restored to horizontal.  The Y axis
  5962. label will then extend beyond the clip boundary.  With \fBnorotate\fR, the Y
  5963. axis label starts in a less attractive location, but the page can be edited
  5964. without damage.  The \fBrotate\fR option confirms the default behavior.
  5965. .sp 2
  5966. .NH 4
  5967. Size
  5968. .sp 1
  5969. .LP
  5970. .XS
  5971. Size
  5972. .XE
  5973. Default size of a CGM page is 32599 units wide and 23457 units high for
  5974. landscape, or 23457 units wide by 32599 units high for portrait.
  5975. .sp 2
  5976. .NH 4
  5977. Width
  5978. .sp 1
  5979. .LP
  5980. .XS
  5981. Width
  5982. .XE
  5983. All distances in the CGM file are in abstract units.  The application that
  5984. reads the file determines the size of the final page.  By default, the width
  5985. of the final page is assumed to be 6 inches (15.24 cm).  This distance is
  5986. used to calculate the correct font size, and may be changed with the \fBwidth\fR
  5987. option.  The keyword should be followed by the width in points.  (Here, a
  5988. point is 1/72 inch, as in PostScript.  This unit is known as a "big point"
  5989. in TeX.)  \fBgnuplot\fR arithmetic can be used to convert from other units, as
  5990. follows:
  5991. .br
  5992.       set terminal cgm width 432            # default
  5993. .br
  5994. .br
  5995.       set terminal cgm width 6*72           # same as above
  5996. .br
  5997. .br
  5998.       set terminal cgm width 10/2.54*72     # 10 cm wide
  5999. .br
  6000. .sp 2
  6001. .NH 4
  6002. Winword6
  6003. .sp 1
  6004. .LP
  6005. .XS
  6006. Winword6
  6007. .XE
  6008. The default font table was chosen to match, where possible, the default font
  6009. assignments made by the Computer Graphics Metafile input filter for
  6010. Microsoft Word 6.0c, although the filter makes available only \&'Arial\&' and
  6011. \&\&'Times Roman\&' fonts and their bold and/or italic variants.  Other fonts such
  6012. as \&'Helvetica\&' and \&'Roman\&' are not available.  If the CGM file includes a
  6013. font table, the filter mostly ignores it.  However, it changes certain font
  6014. assignments so that they disagree with the table.  As a workaround, the
  6015. \fBwinword6\fR option deletes the font table from the CGM file.  In this case,
  6016. the filter makes predictable font assignments.  \&'Arial Bold\&' is correctly
  6017. assigned even with the font table present, which is one reason it was chosen
  6018. as the default.
  6019.  
  6020. \fBwinword6\fR disables the color tables for a similar reason---with the color
  6021. table included, Microsoft Word displays black for color 7.
  6022. .sp 2
  6023. .RE
  6024. .br
  6025. .NH 3
  6026. Corel
  6027. .sp 1
  6028. .LP
  6029. .XS
  6030. Corel
  6031. .XE
  6032. The \fBcorel\fR terminal driver supports CorelDraw.
  6033.  
  6034. Syntax:       set terminal corel {  default
  6035. .br
  6036.                           | {monochrome | color
  6037. .br
  6038. .br
  6039.                                {<fontname> {"<fontsize>" 
  6040. .br
  6041. .br
  6042.                                   {<xsize> <ysize> {<linewidth> }}}}}
  6043. .br
  6044.  
  6045. where the fontsize and linewidth are specified in points and the sizes in
  6046. inches.  The defaults are monochrome, "SwitzerlandLight", 22, 8.2, 10 and 1.2.
  6047. .sp 2
  6048. .NH 3
  6049. Debug
  6050. .sp 1
  6051. .LP
  6052. .XS
  6053. Debug
  6054. .XE
  6055. This terminal is provided to allow for the debugging of \fBgnuplot\fR.  It is
  6056. likely to be of use only for users who are modifying the source code.
  6057. .sp 2
  6058. .NH 3
  6059. Svga
  6060. .sp 1
  6061. .LP
  6062. .XS
  6063. Svga
  6064. .XE
  6065. The \fBsvga\fR terminal driver supports PCs with SVGA graphics.  It can only be
  6066. be used if it is compiled with DJGPP.  Its only option is the font.
  6067.  
  6068. Syntax:
  6069. .br
  6070.       set terminal svga {"<fontname>"}
  6071. .br
  6072. .sp 2
  6073. .NH 3
  6074. Dumb
  6075. .sp 1
  6076. .LP
  6077. .XS
  6078. Dumb
  6079. .XE
  6080. The \fBdumb\fR terminal driver has an optional size specification and trailing
  6081. linefeed control.
  6082.  
  6083. Syntax:
  6084. .br
  6085.       set terminal dumb {[no]feed} {<xsize> <ysize>}
  6086. .br
  6087.  
  6088. where <xsize> and <ysize> set the size of the dumb terminals. Default is
  6089. 79 by 24. The last newline is printed only if \fBfeed\fR is enabled.
  6090.  
  6091. Examples:
  6092. .br
  6093.       set term dumb nofeed
  6094. .br
  6095. .br
  6096.       set term dumb 79 49 # VGA screen---why would anyone do that?
  6097. .br
  6098. .sp 2
  6099. .NH 3
  6100. Dxf
  6101. .sp 1
  6102. .LP
  6103. .XS
  6104. Dxf
  6105. .XE
  6106. The \fBdxf\fR terminal driver creates pictures that can be imported into AutoCad
  6107. (Release 10.x).  It has no options of its own, but some features of its plots
  6108. may be modified by other means.  The default size is 120x80 AutoCad units,
  6109. which can be changed by \fBset size\fR.  \fBdxf\fR uses seven colors (white, red,
  6110. yellow, green, cyan, blue and magenta), which can be changed only by
  6111. modifying the source file.  If a black-and-white plotting device is used, the
  6112. colors are mapped to differing line thicknesses.  See the description of the
  6113. AutoCad print/plot command.
  6114. .sp 2
  6115. .NH 3
  6116. Dxy800a
  6117. .sp 1
  6118. .LP
  6119. .XS
  6120. Dxy800a
  6121. .XE
  6122. This terminal driver supports the Roland DXY800A plotter.  It has no options.
  6123. .sp 2
  6124. .NH 3
  6125. Eepic
  6126. .sp 1
  6127. .LP
  6128. .XS
  6129. Eepic
  6130. .XE
  6131. The \fBeepic\fR terminal driver supports the extended LaTeX picture environment.
  6132. It is an alternative to the \fBlatex\fR driver.
  6133.  
  6134. The output of this terminal is intended for use with the "eepic.sty" macro
  6135. package for LaTeX.  To use it, you need "eepic.sty", "epic.sty" and a
  6136. printer driver that supports the "tpic" \\specials.  If your printer driver
  6137. doesn\&'t support those \\specials, "eepicemu.sty" will enable you to use some
  6138. of them.
  6139.  
  6140. Although dotted and dashed lines are possible with \fBeepic\fR and are tempting,
  6141. they do not work well for high-sample-rate curves, fusing the dashes all
  6142. together into a solid line.  For now, the \fBeepic\fR driver creates only solid
  6143. lines.  There is another gnuplot driver (\fBtpic\fR) that supports dashed lines,
  6144. but it cannot be used if your DVI driver doesn\&'t support "tpic" \\specials.
  6145.  
  6146. The \fBeepic\fR terminal has no options.
  6147. .sp 2
  6148. .NH 3
  6149. Emxvga
  6150. .sp 1
  6151. .LP
  6152. .XS
  6153. Emxvga
  6154. .XE
  6155. The \fBemxvga\fR, \fBemxvesa\fR and \fBvgal\fR terminal drivers support PCs with SVGA,
  6156. vesa SVGA and VGA graphics boards, respectively.  They are intended to be
  6157. compiled with "emx-gcc" under either DOS or OS/2.  They also need VESA and
  6158. SVGAKIT maintained by Johannes Martin (JMARTIN@GOOFY.ZDV.UNI-MAINZ.DE) with
  6159. additions by David J. Liu (liu@phri.nyu.edu).
  6160.  
  6161. Syntax:
  6162. .br
  6163.       set terminal emxvga
  6164. .br
  6165. .br
  6166.       set terminal emxvesa {vesa-mode}
  6167. .br
  6168. .br
  6169.       set terminal vgal
  6170. .br
  6171.  
  6172. The only option is the vesa mode for \fBemxvesa\fR, which defaults to G640x480x256.
  6173. .sp 2
  6174. .NH 3
  6175. Epson-180dpi
  6176. .sp 1
  6177. .LP
  6178. .XS
  6179. Epson-180dpi
  6180. .XE
  6181. This driver supports a family of Epson printers and derivatives.
  6182.  
  6183. \fBepson-180dpi\fR and \fBepson-60dpi\fR are drivers for Epson LQ-style 24-pin
  6184. printers with resolutions of 180 and 60 dots per inch, respectively.
  6185.  
  6186. \fBepson-lx800\fR is a generic 9-pin driver appropriate for printers like the
  6187. Epson LX-800, the Star NL-10 and NX-1000, the PROPRINTER, and so forth.
  6188.  
  6189. \fBnec-cp6\fR is generix 24-pin driver that can be used for printers like the
  6190. NEC CP6 and the Epson LQ-800.
  6191.  
  6192. The \fBokidata\fR driver supports the 9-pin OKIDATA 320/321 Standard printers.
  6193.  
  6194. The \fBstarc\fR driver is for the Star Color Printer.
  6195.  
  6196. The \fBtandy-60dpi\fR driver is for the Tandy DMP-130 series of 9-pin, 60-dpi
  6197. printers.
  6198.  
  6199. Only \fBnec-cp6\fR has any options.
  6200. Syntax:
  6201. .br
  6202.       set terminal nec-cp6 {monochrome | colour | draft}
  6203. .br
  6204.  
  6205. which defaults to monochrome.
  6206. With each of these drivers, a binary copy is required on a PC to print.  Do
  6207. not use \fBprint\fR---use instead \fBcopy file /b lpt1:\fR.
  6208. .sp 2
  6209. .NH 3
  6210. Excl
  6211. .sp 1
  6212. .LP
  6213. .XS
  6214. Excl
  6215. .XE
  6216. The \fBexcl\fR terminal driver supports Talaris printers such as the EXCL Laser
  6217. printer and the 1590.  It has no options.
  6218. .sp 2
  6219. .NH 3
  6220. Hercules
  6221. .sp 1
  6222. .LP
  6223. .XS
  6224. Hercules
  6225. .XE
  6226. These drivers supports PC monitors with autodetected graphics boards.  They
  6227. can be used only when compiled with Zortech C/C++.  None have options.
  6228. .sp 2
  6229. .NH 3
  6230. Fig
  6231. .sp 1
  6232. .LP
  6233. .XS
  6234. Fig
  6235. .XE
  6236. The \fBfig\fR terminal device generates output in the Fig graphics language.
  6237.  
  6238. Syntax:
  6239. .br
  6240.       set terminal fig {monochrome | color} {small | big}
  6241. .br
  6242. .br
  6243.                        {pointsmax <max_points>}
  6244. .br
  6245. .br
  6246.                        {landscape | portrait}
  6247. .br
  6248. .br
  6249.                        {metric | inches}
  6250. .br
  6251. .br
  6252.                        {fontsize <fsize>}
  6253. .br
  6254. .br
  6255.                        {size <xsize> <ysize>}
  6256. .br
  6257. .br
  6258.                        {thickness <units>}
  6259. .br
  6260. .br
  6261.                        {depth <layer>}
  6262. .br
  6263.  
  6264. \fBmonochrome\fR and \fBcolor\fR determine whether the picture is black-and-white or
  6265. \fBcolor\fR.  \fBsmall\fR and \fBbig\fR produce a 5x3 or 8x5 inch graph in the default
  6266. \fBlandscape\fR mode and 3x5 or 5x8 inches in \fBportrait\fR mode.  <max_points>
  6267. sets the maximum number of points per polyline.  Default units for editing
  6268. with "xfig" may be \fBmetric\fR or \fBinches\fR.  \fBfontsize\fR sets the size of the
  6269. text font to <fsize> points.  \fBsize\fR sets (overrides) the size of the drawing
  6270. area to <xsize>*<ysize> in units of inches or centimeters depending on the
  6271. \fBinches\fR or \fBmetric\fR setting in effect.  \fBdepth\fR sets the default depth layer
  6272. for all lines and text.  The default depth is 10 to leave room for adding
  6273. material with "xfig" on top of the plot.
  6274.  
  6275. \fBthickness\fR sets the default line thickness, which is 1 if not specified.
  6276. Overriding the thickness can be achieved by adding a multiple of 100 to the
  6277. to the \fBlinetype\fR value for a \fBplot\fR command.  In a similar way the \fBdepth\fR
  6278. of plot elements (with respect to the default depth) can be controlled by
  6279. adding a multiple of 1000 to <linetype>.  The depth is then <layer> +
  6280. <linetype>/1000 and the thickness is (<linetype>%1000)/100 or, if that is
  6281. zero, the default line thickness.
  6282. Additional point-plot symbols are also available with the \fBfig\fR driver. The
  6283. symbols can be used through \fBpointtype\fR values % 100 above 50, with different
  6284. fill intensities controlled by <pointtype> % 5 and outlines in black (for
  6285. <pointtype> % 10 < 5) or in the current color.  Available symbols are
  6286. .br
  6287.         50 - 59:  circles
  6288. .br
  6289. .br
  6290.         60 - 69:  squares
  6291. .br
  6292. .br
  6293.         70 - 79:  diamonds
  6294. .br
  6295. .br
  6296.         80 - 89:  upwards triangles
  6297. .br
  6298. .br
  6299.         90 - 99:  downwards triangles
  6300. .br
  6301. The size of these symbols is linked to the font size.  The depth of symbols
  6302. is by default one less than the depth for lines to achieve nice error bars.
  6303. If <pointtype> is above 1000, the depth is <layer> + <pointtype>/1000-1.  If
  6304. <pointtype>%1000 is above 100, the fill color is (<pointtype>%1000)/100-1.
  6305.  
  6306. Available fill colors are (from 1 to 9): black, blue, green, cyan, red,
  6307. magenta, yellow, white and dark blue (in monochrome mode: black for 1 to 6
  6308. and white for 7 to 9).
  6309.  
  6310. See \fBplot with\fR for details of <linetype> and <pointtype>.
  6311.  
  6312. The \fBbig\fR option is a substitute for the \fBbfig\fR terminal in earlier versions,
  6313. which is no longer supported.
  6314.  
  6315. Examples:
  6316. .br
  6317.       set terminal fig monochrome small pointsmax 1000  # defaults
  6318. .br
  6319.  
  6320. .br
  6321.       plot 'file.dat' with points linetype 102 pointtype 759
  6322. .br
  6323. would produce circles with a blue outline of width 1 and yellow fill color.
  6324.  
  6325. .br
  6326.       plot 'file.dat' using 1:2:3 with err linetype 1 pointtype 554
  6327. .br
  6328. would produce errorbars with black lines and circles filled red.  These
  6329. circles are one layer above the lines (at depth 9 by default).
  6330.  
  6331. To plot the error bars on top of the circles use
  6332. .br
  6333.       plot 'file.dat' using 1:2:3 with err linetype 1 pointtype 2554
  6334. .br
  6335. .sp 2
  6336. .NH 3
  6337. Gif
  6338. .sp 1
  6339. .LP
  6340. .XS
  6341. Gif
  6342. .XE
  6343. The \fBgif\fR terminal driver generates output in GIF format.  It must be linked
  6344. with the "gd" library (link with "-Lterm/gd -lgd" if your directory structure
  6345. is "gnuplot/term/gd").  "gd" cannot be distributed with \fBgnuplot\fR because of
  6346. license problems.  Find out about "gd" from http://www.boutell.com/
  6347.  
  6348. Syntax:
  6349. .br
  6350.       set terminal gif {transparent} {interlace}
  6351. .br
  6352. .br
  6353.                        {small | medium | large}
  6354. .br
  6355. .br
  6356.                        {size <x>,<y>}
  6357. .br
  6358. .br
  6359.                        {<color0> <color1> <color2> ...}
  6360. .br
  6361.  
  6362. \fBtransparent\fR instructs the driver to generate transparent GIFs.  The first
  6363. color will be the transparent one.
  6364.  
  6365. \fBinterlace\fR instructs the driver to generate interlaced GIFs.
  6366.  
  6367. The choice of fonts is \fBsmall\fR (6x12 pixels), \fBmedium\fR (7x13 Bold) or \fBlarge\fR
  6368. (8x16).
  6369.  
  6370. The size <x,y> is given in pixels---it defaults to 640x480.  The number of
  6371. pixels can be also modified by scaling with the \fBset size\fR command.
  6372.  
  6373. Each color must be of the form \&'xrrggbb\&', where x is the literal character
  6374. \&\&'x\&' and \&'rrggbb\&' are the red, green and blue components in hex.  For example,
  6375. \&\&'x00ff00\&' is green.  The background color is set first, then the border
  6376. colors, then the X & Y axis colors, then the plotting colors.  The maximum
  6377. number of colors that can be set is 256.
  6378.  
  6379. Examples:
  6380. .br
  6381.       set terminal gif small size 640,480 \\
  6382. .br
  6383. .br
  6384.                        xffffff x000000 x404040 \\
  6385. .br
  6386. .br
  6387.                        xff0000 xffa500 x66cdaa xcdb5cd \\
  6388. .br
  6389. .br
  6390.                        xadd8e6 x0000ff xdda0dd x9500d3    # defaults
  6391. .br
  6392.  
  6393. which uses white for the non-transparent background, black for borders, gray
  6394. for the axes, and red, orange, medium aquamarine, thistle 3, light blue, blue,
  6395. plum and dark violet for eight plotting colors.
  6396.  
  6397. .br
  6398.       set terminal gif transparent xffffff \\
  6399. .br
  6400. .br
  6401.                        x000000 x202020 x404040 x606060 \\
  6402. .br
  6403. .br
  6404.                        x808080 xA0A0A0 xC0C0C0 xE0E0E0 \\
  6405. .br
  6406. which uses white for the transparent background, black for borders, dark
  6407. gray for axes, and a gray-scale for the six plotting colors.
  6408.  
  6409. The page size is 640x480 pixels.  The \fBgif\fR driver can create either color
  6410. or monochromatic output, but you have no control over which is produced.
  6411.  
  6412. The current version of the \fBgif\fR driver does not support animated GIFs.
  6413. .sp 2
  6414. .NH 3
  6415. Unixplot
  6416. .sp 1
  6417. .LP
  6418. .XS
  6419. Unixplot
  6420. .XE
  6421. The \fBunixplot\fR driver produces device-independent output in the GNU plot
  6422. graphics language.  The default size of the PostScript results generated by
  6423. "plot2ps" is 5 x 3 inches; this can be increased up to about 8.25 x 8.25 by
  6424. \fBset size\fR.
  6425.  
  6426. Syntax:
  6427. .br
  6428.       set terminal unixplot {"<fontname>"} {<fontsize>}
  6429. .br
  6430.  
  6431. which defaults to 10-point "Courier".
  6432.  
  6433. There is a non-GNU version of the \fBunixplot\fR driver which cannot be compiled
  6434. unless this version is left out.
  6435. .sp 2
  6436. .NH 3
  6437. Gpic
  6438. .sp 1
  6439. .LP
  6440. .XS
  6441. Gpic
  6442. .XE
  6443. The \fBgpic\fR terminal driver generates GPIC graphs in the Free Software
  6444. Foundations\&'s "groff" package.  The default size is 5 x 3 inches.  The only
  6445. option is the origin, which defaults to (0,0).
  6446.  
  6447. Syntax:
  6448. .br
  6449.       set terminal gpic {<x> <y>}
  6450. .br
  6451.  
  6452. where \fBx\fR and \fBy\fR are in inches.
  6453.  
  6454. A simple graph can be formatted using
  6455.  
  6456. .br
  6457.       groff -p -mpic -Tps file.pic > file.ps.
  6458. .br
  6459.  
  6460. The output from pic can be pipe-lined into eqn, so it is possible to put
  6461. complex functions in a graph with the \fBset label\fR and \fBset {x/y}label\fR
  6462. commands.  For instance,
  6463.  
  6464. .br
  6465.       set ylab '@space 0 int from 0 to x alpha ( t ) roman d t@'
  6466. .br
  6467.  
  6468. will label the y axis with a nice integral if formatted with the command:
  6469.  
  6470. .br
  6471.       gpic filename.pic | geqn -d@@ -Tps | groff -m[macro-package] -Tps
  6472. .br
  6473. .br
  6474.           > filename.ps
  6475. .br
  6476.  
  6477. Figures made this way can be scaled to fit into a document.  The pic language
  6478. is easy to understand, so the graphs can be edited by hand if need be.  All
  6479. co-ordinates in the pic-file produced by \fBgnuplot\fR are given as x+gnuplotx
  6480. and y+gnuploty.  By default x and y are given the value 0.  If this line is
  6481. removed with an editor in a number of files, one can put several graphs in
  6482. one figure like this (default size is 5.0x3.0 inches):
  6483.  
  6484. .br
  6485.       .PS 8.0
  6486. .br
  6487. .br
  6488.       x=0;y=3
  6489. .br
  6490. .br
  6491.       copy "figa.pic"
  6492. .br
  6493. .br
  6494.       x=5;y=3
  6495. .br
  6496. .br
  6497.       copy "figb.pic"
  6498. .br
  6499. .br
  6500.       x=0;y=0
  6501. .br
  6502. .br
  6503.       copy "figc.pic"
  6504. .br
  6505. .br
  6506.       x=5;y=0
  6507. .br
  6508. .br
  6509.       copy "figd.pic"
  6510. .br
  6511. .br
  6512.       .PE
  6513. .br
  6514.  
  6515. This will produce an 8-inch-wide figure with four graphs in two rows on top
  6516. of each other.
  6517.  
  6518. One can also achieve the same thing by the command
  6519.  
  6520. .br
  6521.       set terminal gpic x y
  6522. .br
  6523.  
  6524. for example, using
  6525.  
  6526. .br
  6527.       .PS 6.0
  6528. .br
  6529. .br
  6530.       copy "trig.pic"
  6531. .br
  6532. .br
  6533.       .PE
  6534. .br
  6535. .sp 2
  6536. .NH 3
  6537. Gpr
  6538. .sp 1
  6539. .LP
  6540. .XS
  6541. Gpr
  6542. .XE
  6543. The \fBgpr\fR terminal driver supports the Apollo Graphics Primitive Resource
  6544. for a fixed-size window.  It has no options.
  6545.  
  6546. If a variable window size is desired, use the \fBapollo\fR terminal instead.
  6547. .sp 2
  6548. .NH 3
  6549. Grass
  6550. .sp 1
  6551. .LP
  6552. .XS
  6553. Grass
  6554. .XE
  6555. The \fBgrass\fR terminal driver gives \fBgnuplot\fR capabilities to users of the 
  6556. GRASS geographic information system.  Contact grassp-list@moon.cecer.army.mil
  6557. for more information.  Pages are written to the current frame of the GRASS
  6558. Graphics Window.  There are no options.
  6559. .sp 2
  6560. .NH 3
  6561. Hp2623a
  6562. .sp 1
  6563. .LP
  6564. .XS
  6565. Hp2623a
  6566. .XE
  6567. The \fBhp2623a\fR terminal driver supports the Hewlett Packard HP2623A.  It has
  6568. no options.
  6569. .sp 2
  6570. .NH 3
  6571. Hp2648
  6572. .sp 1
  6573. .LP
  6574. .XS
  6575. Hp2648
  6576. .XE
  6577. The \fBhp2648\fR terminal driver supports the Hewlett Packard HP2647 and HP2648.
  6578. It has no options.
  6579. .sp 2
  6580. .NH 3
  6581. Hp500c
  6582. .sp 1
  6583. .LP
  6584. .XS
  6585. Hp500c
  6586. .XE
  6587. The \fBhp500c\fR terminal driver supports the Hewlett Packard HP DeskJet 500c.
  6588. It has options for resolution and compression.
  6589.  
  6590. Syntax:
  6591. .br
  6592.       set terminal hp500c {<res>} {<comp>}
  6593. .br
  6594.  
  6595. where \fBres\fR can be 75, 100, 150 or 300 dots per inch and \fBcomp\fR can be "rle",
  6596. or "tiff".  Any other inputs are replaced by the defaults, which are 75 dpi
  6597. and no compression.  Rasterization at the higher resolutions may require a
  6598. large amount of memory.
  6599. .sp 2
  6600. .NH 3
  6601. Hpgl
  6602. .sp 1
  6603. .LP
  6604. .XS
  6605. Hpgl
  6606. .XE
  6607. The \fBhpgl\fR driver produces HPGL output for devices like the HP7475A plotter.
  6608. There are two options which can be set---the number of pens and "eject", which
  6609. tells the plotter to eject a page when done.  The default is to use 6 pens
  6610. and not to eject the page when done.
  6611.  
  6612. The international character sets ISO-8859-1 and CP850 are recognized via
  6613. \fBset encoding iso_8859_1\fR or \fBset encoding cp850\fR (see \fBset encoding\fR for
  6614. details).
  6615.  
  6616. Syntax:
  6617. .br
  6618.       set terminal hpgl {<number_of_pens>} {eject}
  6619. .br
  6620.  
  6621. The selection
  6622.  
  6623. .br
  6624.       set terminal hpgl 8 eject
  6625. .br
  6626.  
  6627. is equivalent to the previous \fBhp7550\fR terminal, and the selection
  6628.  
  6629. .br
  6630.       set terminal hpgl 4
  6631. .br
  6632.  
  6633. is equivalent to the previous \fBhp7580b\fR terminal.
  6634.  
  6635. The \fBpcl5\fR driver supports the Hewlett-Packard Laserjet III.  It actually uses
  6636. HPGL-2, but there is a name conflict among the terminal devices.  It has
  6637. several options
  6638.  
  6639. Syntax:
  6640. .br
  6641.       set terminal pcl5 {<mode>} {<font>} {<fontsize>}
  6642. .br
  6643.  
  6644. where <mode> is \fBlandscape\fR, or \fBportrait\fR, <font> is \fBstick\fR, \fBunivers\fR, or
  6645. \fBcg_times\fR, and <fontsize> is the size in points.
  6646.  
  6647. With \fBpcl5\fR international characters are handled by the printer; you just put
  6648. the appropriate 8-bit character codes into the text strings.  You don\&'t need
  6649. to bother with \fBset encoding\fR.
  6650.  
  6651. HPGL graphics can be imported by many software packages.
  6652. .sp 2
  6653. .NH 3
  6654. Hpljii
  6655. .sp 1
  6656. .LP
  6657. .XS
  6658. Hpljii
  6659. .XE
  6660. The \fBhpljii\fR terminal driver supports the HP Laserjet Series II printer.  The
  6661. \fBhpdj\fR driver supports the HP DeskJet 500 printer.  These drivers allow a
  6662. choice of resolutions.
  6663.  
  6664. Syntax:
  6665. .br
  6666.       set terminal hpljii | hpdj {<res>}
  6667. .br
  6668.  
  6669. where \fBres\fR may be 75, 100, 150 or 300 dots per inch; the default is 75.
  6670. Rasterization at the higher resolutions may require a large amount of memory.
  6671.  
  6672. The \fBhp500c\fR terminal is similar to \fBhpdj\fR; \fBhp500c\fR additionally supports
  6673. color and compression.
  6674. .sp 2
  6675. .NH 3
  6676. Hppj
  6677. .sp 1
  6678. .LP
  6679. .XS
  6680. Hppj
  6681. .XE
  6682. The \fBhppj\fR terminal driver supports the HP PaintJet and HP3630 printers.  The
  6683. only option is the choice of font.
  6684.  
  6685. Syntax:
  6686. .br
  6687.       set terminal hppj {FNT5X9 | FNT9X17 | FNT13X25}
  6688. .br
  6689.  
  6690. with the middle-sized font (FNT9X17) being the default.
  6691. .sp 2
  6692. .NH 3
  6693. Imagen
  6694. .sp 1
  6695. .LP
  6696. .XS
  6697. Imagen
  6698. .XE
  6699. The \fBimagen\fR terminal driver supports Imagen laser printers.  It is capable
  6700. of placing multiple graphs on a single page.
  6701.  
  6702. Syntax:
  6703. .br
  6704.       set terminal imagen {<fontsize>} {portrait | landscape}
  6705. .br
  6706. .br
  6707.                           {[<horiz>,<vert>]}
  6708. .br
  6709.  
  6710. where \fBfontsize\fR defaults to 12 points and the layout defaults to \fBlandscape\fR.
  6711. \fB<horiz>\fR and \fB<vert>\fR are the number of graphs in the horizontal and
  6712. vertical directions; these default to unity.
  6713.  
  6714. Example:
  6715. .br
  6716.       set terminal imagen portrait [2,3]
  6717. .br
  6718.  
  6719. puts six graphs on the page in three rows of two in portrait orientation.
  6720. .sp 2
  6721. .NH 3
  6722. Iris4d
  6723. .sp 1
  6724. .LP
  6725. .XS
  6726. Iris4d
  6727. .XE
  6728. The \fBiris4d\fR terminal driver supports Silicon Graphics IRIS 4D computers.
  6729. Its only option is 8- or 24-bit color depth.  The default is 8.
  6730.  
  6731. Syntax:
  6732. .br
  6733.       set terminal iris4d {8 | 24}
  6734. .br
  6735.  
  6736. The color depth is not really a choice -- the value appropriate for the
  6737. hardware should be selected.
  6738.  
  6739. When using 24-bit mode, the colors can be directly specified via the file
  6740. \&.gnuplot_iris4d that is searched in the current directory and then in the
  6741. home directory specified by the HOME environment variable.  This file holds
  6742. RGB values for the background, border, labels and nine plotting colors, in
  6743. that order.  For example, here is a file containing the default colors:
  6744.  
  6745. .br
  6746.       85   85   85     Background   (dark gray)
  6747. .br
  6748. .br
  6749.       0    0    0      Boundary     (black)
  6750. .br
  6751. .br
  6752.       170  0    170    Labeling     (magenta)
  6753. .br
  6754. .br
  6755.       85   255  255    Plot Color 1 (light cyan)
  6756. .br
  6757. .br
  6758.       170  0    0      Plot Color 2 (red)
  6759. .br
  6760. .br
  6761.       0    170  0      Plot Color 3 (green)
  6762. .br
  6763. .br
  6764.       255  85   255    Plot Color 4 (light magenta)
  6765. .br
  6766. .br
  6767.       255  255  85     Plot Color 5 (yellow)
  6768. .br
  6769. .br
  6770.       255  85   85     Plot Color 6 (light red)
  6771. .br
  6772. .br
  6773.       85   255  85     Plot Color 7 (light green)
  6774. .br
  6775. .br
  6776.       0    170  170    Plot Color 8 (cyan)
  6777. .br
  6778. .br
  6779.       170  170  0      Plot Color 9 (brown)
  6780. .br
  6781.  
  6782. This file must have exactly 12 lines of RGB triples.  No empty lines are
  6783. allowed, and anything after the third number on a line is ignored.
  6784. .sp 2
  6785. .NH 3
  6786. Kyo
  6787. .sp 1
  6788. .LP
  6789. .XS
  6790. Kyo
  6791. .XE
  6792. The \fBkyo\fR and \fBprescribe\fR terminal drivers support the Kyocera laser printer.
  6793. The only difference between the two is that \fBkyo\fR uses "Helvetica" whereas
  6794. \fBprescribe\fR uses "Courier".  There are no options.
  6795. .sp 2
  6796. .NH 3
  6797. Latex
  6798. .sp 1
  6799. .LP
  6800. .XS
  6801. Latex
  6802. .XE
  6803. The \fBlatex\fR and \fBemtex\fR drivers allow two options.
  6804.  
  6805. Syntax:
  6806. .br
  6807.       set terminal latex | emtex {courier | roman} {<fontsize>}
  6808. .br
  6809.  
  6810. \fBfontsize\fR may be any size you specify.  The default is 10-point Roman.
  6811.  
  6812. Unless your driver is capable of building fonts at any size (e.g. dvips),
  6813. stick to the standard 10, 11 and 12 point sizes.
  6814.  
  6815. METAFONT users beware: METAFONT does not like odd sizes.
  6816. .sp 2
  6817. .NH 3
  6818. Linux
  6819. .sp 1
  6820. .LP
  6821. .XS
  6822. Linux
  6823. .XE
  6824. The \fBlinux\fR driver has no additional options to specify.  It looks at the
  6825. environment variable GSVGAMODE for the default mode; if not set, it uses
  6826. 1024x768x256 as default mode or, if that is not possible, 640x480x16
  6827. (standard VGA).
  6828. .sp 2
  6829. .NH 3
  6830. Mf
  6831. .sp 1
  6832. .LP
  6833. .XS
  6834. Mf
  6835. .XE
  6836. The \fBmf\fR terminal driver creates a input file to the METAFONT program.  Thus a
  6837. figure may be used in the TeX document in the same way as is a character.
  6838.  
  6839. To use a picture in a document, the METAFONT program must be run with the
  6840. output file from \fBgnuplot\fR as input.  Thus, the user needs a basic knowledge
  6841. of the font creating process and the procedure for including a new font in a
  6842. document.  However, if the METAFONT program is set up properly at the local
  6843. site, an unexperienced user could perform the operation without much trouble.
  6844.  
  6845. The text support is based on a METAFONT character set.  Currently the
  6846. Computer Modern Roman font set is input, but the user is in principal free to
  6847. chose whatever fonts he or she needs.  The METAFONT source files for the
  6848. chosen font must be available.  Each character is stored in a separate
  6849. picture variable in METAFONT.  These variables may be manipulated (rotated,
  6850. scaled etc.) when characters are needed.  The drawback is the interpretation
  6851. time in the METAFONT program.  On some machines (i.e. PC) the limited amount
  6852. of memory available may also cause problems if too many pictures are stored.
  6853.  
  6854. The \fBmf\fR terminal has no options.
  6855. .sp 2
  6856. .RS
  6857. .IP
  6858. .NH 4
  6859. METAFONT Instructions
  6860. .sp 1
  6861. .LP
  6862. .XS
  6863. METAFONT Instructions
  6864. .XE
  6865.  
  6866. - Set your terminal to METAFONT:
  6867. .br
  6868.   set terminal mf
  6869. .br
  6870. - Select an output-file, e.g.:
  6871. .br
  6872.   set output "myfigures.mf"
  6873. .br
  6874. - Create your pictures. Each picture will generate a separate character. Its
  6875. default size will be 5*3 inches. You can change the size by saying \fBset size
  6876. 0.5,0.5\fR or whatever fraction of the default size you want to have.
  6877.  
  6878. - Quit \fBgnuplot\fR.
  6879.  
  6880. - Generate a TFM and GF file by running METAFONT on the output of \fBgnuplot\fR.
  6881. Since the picture is quite large (5*3 in), you will have to use a version of
  6882. METAFONT that has a value of at least 150000 for memmax.  On Unix systems
  6883. these are conventionally installed under the name bigmf.  For the following
  6884. assume that the command virmf stands for a big version of METAFONT.  For
  6885. example:
  6886.  
  6887. - Invoke METAFONT:
  6888. .br
  6889.     virmf '&plain'
  6890. .br
  6891. - Select the output device: At the METAFONT prompt (\&'*\&') type:
  6892. .br
  6893.     \\mode:=CanonCX;     % or whatever printer you use
  6894. .br
  6895. - Optionally select a magnification:
  6896. .br
  6897.     mag:=1;             % or whatever you wish
  6898. .br
  6899. - Input the \fBgnuplot\fR-file:
  6900. .br
  6901.     input myfigures.mf
  6902. .br
  6903. On a typical Unix machine there will usually be a script called "mf" that
  6904. executes virmf \&'&plain\&', so you probably can substitute mf for virmf &plain.
  6905. This will generate two files: mfput.tfm and mfput.$$$gf (where $$$ indicates
  6906. the resolution of your device).  The above can be conveniently achieved by
  6907. typing everything on the command line, e.g.:
  6908. virmf \&'&plain\&' \&'\\mode:=CanonCX; mag:=1; input myfigures.mf\&'
  6909. In this case the output files will be named myfigures.tfm and
  6910. myfigures.300gf.
  6911.  
  6912. - Generate a PK file from the GF file using gftopk:
  6913. .br
  6914.   gftopk myfigures.300gf myfigures.300pk
  6915. .br
  6916. The name of the output file for gftopk depends on the DVI driver you use.
  6917. Ask your local TeX administrator about the naming conventions.  Next, either
  6918. install the TFM and PK files in the appropriate directories, or set your
  6919. environment variables properly.  Usually this involves setting TEXFONTS to
  6920. include the current directory and doing the same thing for the environment
  6921. variable that your DVI driver uses (no standard name here...).  This step is
  6922. necessary so that TeX will find the font metric file and your DVI driver will
  6923. find the PK file.
  6924.  
  6925. - To include your pictures in your document you have to tell TeX the font:
  6926. .br
  6927.   \\font\\gnufigs=myfigures
  6928. .br
  6929. Each picture you made is stored in a single character.  The first picture is
  6930. character 0, the second is character 1, and so on...  After doing the above
  6931. step, you can use the pictures just like any other characters.  Therefore, to
  6932. place pictures 1 and 2 centered in your document, all you have to do is:
  6933. .br
  6934.   \\centerline{\\gnufigs\\char0}
  6935. .br
  6936. .br
  6937.   \\centerline{\\gnufigs\\char1}
  6938. .br
  6939. in plain TeX.  For LaTeX you can, of course, use the picture environment and
  6940. place the picture wherever you wish by using the \\makebox and \\put macros.
  6941.  
  6942. This conversion saves you a lot of time once you have generated the font;
  6943. TeX handles the pictures as characters and uses minimal time to place them,
  6944. and the documents you make change more often than the pictures do.  It also
  6945. saves a lot of TeX memory.  One last advantage of using the METAFONT driver
  6946. is that the DVI file really remains device independent, because no \\special
  6947. commands are used as in the eepic and tpic drivers.
  6948. .sp 2
  6949. .RE
  6950. .br
  6951. .NH 3
  6952. Mgr
  6953. .sp 1
  6954. .LP
  6955. .XS
  6956. Mgr
  6957. .XE
  6958. The \fBmgr\fR terminal driver supports the Mgr Window system.  It has no options.
  6959. .sp 2
  6960. .NH 3
  6961. Mif
  6962. .sp 1
  6963. .LP
  6964. .XS
  6965. Mif
  6966. .XE
  6967. The \fBmif\fR terminal driver produces Frame Maker MIF format version 3.00.  It
  6968. plots in MIF Frames with the size 15*10 cm, and plot primitives with the same
  6969. pen will be grouped in the same MIF group.  Plot primitives in a \fBgnuplot\fR
  6970. page will be plotted in a MIF Frame, and several MIF Frames are collected in
  6971. one large MIF Frame.  The MIF font used for text is "Times".
  6972.  
  6973. Several options may be set in the MIF 3.00 driver.
  6974.  
  6975. Syntax:
  6976. .br
  6977.       set terminal mif {colour | monochrome} {polyline | vectors}
  6978. .br
  6979. .br
  6980.                        {help | ?}
  6981. .br
  6982.  
  6983. \fBcolour\fR plots lines with line types >= 0 in colour (MIF sep. 2--7) and
  6984. \fBmonochrome\fR plots all line types in black (MIF sep. 0).
  6985. \fBpolyline\fR plots curves as continuous curves and \fBvectors\fR plots curves as
  6986. collections of vectors.
  6987. \fBhelp\fR and \fB?\fR print online help on standard error output---both print a
  6988. short description of the usage; \fBhelp\fR also lists the options;
  6989.  
  6990. Examples:
  6991. .br
  6992.       set term mif colour polylines    # defaults
  6993. .br
  6994. .br
  6995.       set term mif                     # defaults
  6996. .br
  6997. .br
  6998.       set term mif vectors
  6999. .br
  7000. .br
  7001.       set term mif help
  7002. .br
  7003. .sp 2
  7004. .NH 3
  7005. Mtos
  7006. .sp 1
  7007. .LP
  7008. .XS
  7009. Mtos
  7010. .XE
  7011. The \fBmtos\fR terminal has no options.  It sends data via a pipe to an external
  7012. program called GPCLIENT.  It runs under MULTITOS, Magic 3.x, MagicMAC. and
  7013. MiNT.  If you cannot find GPCLIENT, than mail to dirk@lstm.uni-erlangen.de.
  7014. .sp 2
  7015. .NH 3
  7016. Next
  7017. .sp 1
  7018. .LP
  7019. .XS
  7020. Next
  7021. .XE
  7022. Several options may be set in the next driver.
  7023.  
  7024. Syntax:
  7025. .br
  7026.       set terminal next {<mode>} {<type> } {<color>} {<dashed>}
  7027. .br
  7028. .br
  7029.                  {"<fontname>"} {<fontsize>} title {"<newtitle>"}
  7030. .br
  7031.  
  7032. where <mode> is  \fBdefault\fR, which sets all options to their defaults;
  7033. <type> is either \fBnew\fR or \fBold\fR, where \fBold\fR invokes the old single window;
  7034. <color> is either \fBcolor\fR or \fBmonochrome\fR;
  7035. <dashed> is either \fBsolid\fR or \fBdashed\fR;
  7036. "<fontname>" is the name of a valid PostScript font;
  7037. <fontsize> is the size of the font in PostScript points; and
  7038. <title> is the title for the GnuTerm window.
  7039. Defaults are  \fBnew\fR, \fBmonochrome\fR, \fBdashed\fR, "Helvetica", 14pt.
  7040.  
  7041. Examples:
  7042. .br
  7043.       set term next default
  7044. .br
  7045. .br
  7046.       set term next 22
  7047. .br
  7048. .br
  7049.       set term next color "Times-Roman" 14
  7050. .br
  7051. .br
  7052.       set term next color "Helvetica" 12 title "MyPlot"
  7053. .br
  7054. .br
  7055.       set term next old
  7056. .br
  7057. .sp 2
  7058. .NH 3
  7059. Pbm
  7060. .sp 1
  7061. .LP
  7062. .XS
  7063. Pbm
  7064. .XE
  7065. Several options may be set in the \fBpbm\fR terminal---the driver for PBMplus.
  7066.  
  7067. Syntax:
  7068. .br
  7069.       set terminal pbm {<fontsize>} {<mode>}
  7070. .br
  7071.  
  7072. where <fontsize> is \fBsmall\fR, \fBmedium\fR, or \fBlarge\fR and <mode> is \fBmonochrome\fR,
  7073. \fBgray\fR or \fBcolor\fR.  The default plot size is 640 pixels wide and 480 pixels
  7074. high; this may be changed by \fBset size\fR.
  7075.  
  7076. The output of the \fBpbm\fR driver depends upon <mode>: \fBmonochrome\fR produces a
  7077. portable bitmap (one bit per pixel), \fBgray\fR a portable graymap (three bits
  7078. per pixel) and \fBcolor\fR a portable pixmap (color, four bits per pixel).
  7079.  
  7080. The output of this driver can be used with Jef Poskanzer\&'s excellent PBMPLUS
  7081. package, which provides programs to convert the above PBMPLUS formats to GIF,
  7082. TIFF, MacPaint, Macintosh PICT, PCX, X11 bitmap and many others.
  7083.  
  7084. Examples:
  7085. .br
  7086.       set terminal pbm small monochrome             # defaults
  7087. .br
  7088. .br
  7089.       set size 2,2; set terminal pbm color medium
  7090. .br
  7091. .sp 2
  7092. .NH 3
  7093. Pc
  7094. .sp 1
  7095. .LP
  7096. .XS
  7097. Pc
  7098. .XE
  7099. The \fBpc\fR terminal driver supports PCs with arbitrary graphics boards, which
  7100. will be automatically detected.  It should be used only if you are not using
  7101. the gcc or Zortec C/C++ compilers.
  7102. .sp 2
  7103. .NH 3
  7104. Pm
  7105. .sp 1
  7106. .LP
  7107. .XS
  7108. Pm
  7109. .XE
  7110. The \fBpm\fR terminal driver provides an OS/2 Presentation Manager window in
  7111. which the graph is plotted.  The window is opened when the first graph is
  7112. plotted.  This window has its own online help as well as facilities for
  7113. printing, copying to the clipboard and some line type and color adjustments.
  7114. The \fBmultiplot\fR option is supported.
  7115.  
  7116. Syntax:
  7117. .br
  7118.       set terminal pm {server {n}} {persist} {widelines} {enhanced} {"title"}
  7119. .br
  7120.  
  7121. If \fBpersist\fR is specified, each graph appears in its own window and all
  7122. windows remain open after \fBgnuplot\fR exits.  If \fBserver\fR is specified, all
  7123. graphs appear in the same window, which remains open when \fBgnuplot\fR exits.
  7124. This option takes an optional numerical argument which specifies an instance
  7125. of the server process.  Thus multiple server windows can be in use at the
  7126. same time.
  7127.  
  7128. If \fBwidelines\fR is specified, all plots will be drawn with wide lines.  If
  7129. \fBenhanced\fR is specified, sub- and superscripts and multiple fonts are
  7130. enabled using the same syntax as the \fBenhanced postscript\fR option (see \fBset terminal postscript enhanced\fR for details).  Font names for the basic
  7131. PostScript fonts may be abbreviated to single letters.
  7132.  
  7133. If \fBtitle\fR is specified, it will be used as the title of the plot window.
  7134. It will also be used as the name of the server instance, and will override
  7135. the optional numerical argument.
  7136. .sp 2
  7137. .NH 3
  7138. Png
  7139. .sp 1
  7140. .LP
  7141. .XS
  7142. Png
  7143. .XE
  7144. The \fBpng\fR terminal driver supports Portable Network Graphics.  To compile it,
  7145. you will need  the third-party libraries "libpng" and "zlib"; both are
  7146. available at ftp://ftp.uu.net/graphics/png.  \fBpng\fR has two options.
  7147.  
  7148. Syntax:
  7149. .br
  7150.       set terminal png {small | medium | large}
  7151. .br
  7152. .br
  7153.                        {monochrome | gray | color}
  7154. .br
  7155.  
  7156. The defaults are small (fontsize) and monochrome.
  7157. .sp 2
  7158. .NH 3
  7159. Postscript
  7160. .sp 1
  7161. .LP
  7162. .XS
  7163. Postscript
  7164. .XE
  7165. Several options may be set in the \fBpostscript\fR driver.
  7166.  
  7167. Syntax:
  7168. .br
  7169.       set terminal postscript {<mode>} {color | monochrome}
  7170. .br
  7171. .br
  7172.                               {solid | dashed} {<duplexing>}
  7173. .br
  7174. .br
  7175.                               {enhanced | noenhanced}
  7176. .br
  7177. .br
  7178.                               {"<fontname>"} {<fontsize>}
  7179. .br
  7180.  
  7181. where <mode> is \fBlandscape\fR, \fBportrait\fR, \fBeps\fR or \fBdefault\fR
  7182. \fBsolid\fR draws all plots with solid lines, overriding any dashed patterns;
  7183. <duplexing> is \fBdefaultplex\fR, \fBsimplex\fR or \fBduplex\fR ("duplexing" in
  7184. PostScript is the ability of the printer to print on both sides of the same
  7185. page---don\&'t set this if your printer can\&'t do it);
  7186. \fBenhanced\fR activates the "Enhanced PostScript" features (subscripts,
  7187. superscripts and mixed fonts);
  7188. \fB"<fontname>"\fR is the name of a valid PostScript font; and \fB<fontsize>\fR is
  7189. the size of the font in PostScript points.
  7190.  
  7191. \fBdefault\fR mode sets all options to their defaults: \fBlandscape\fR, \fBmonochrome\fR,
  7192. \fBdashed\fR, \fBdefaultplex\fR, \fBnoenhanced\fR, "Helvetica" and 14pt.
  7193. .br
  7194.  Default size of a PostScript plot is 10 inches wide and 7 inches high.
  7195. .br
  7196.  
  7197. \fBeps\fR mode generates EPS (Encapsulated PostScript) output, which is just
  7198. regular PostScript with some additional lines that allow the file to be
  7199. imported into a variety of other applications.  (The added lines are
  7200. PostScript comment lines, so the file may still be printed by itself.)  To
  7201. get EPS output, use the \fBeps\fR mode and make only one plot per file.  In \fBeps\fR
  7202. mode the whole plot, including the fonts, is reduced to half of the default
  7203. size.
  7204.  
  7205. Examples:
  7206. .br
  7207.       set terminal postscript default       # old postscript
  7208. .br
  7209. .br
  7210.       set terminal postscript enhanced      # old enhpost
  7211. .br
  7212. .br
  7213.       set terminal postscript landscape 22  # old psbig
  7214. .br
  7215. .br
  7216.       set terminal postscript eps 14        # old epsf1
  7217. .br
  7218. .br
  7219.       set terminal postscript eps 22        # old epsf2
  7220. .br
  7221. .br
  7222.       set size 0.7,1.4; set term post portrait color "Times-Roman" 14
  7223. .br
  7224. .sp 2
  7225. .RS
  7226. .IP
  7227. .NH 4
  7228. Enhanced postscript
  7229. .sp 1
  7230. .LP
  7231. .XS
  7232. Enhanced postscript
  7233. .XE
  7234.  
  7235. .EQ
  7236. delim $$
  7237. .EN
  7238. .KS
  7239. .TS
  7240. center box tab (@) ;
  7241. c c l .
  7242. .TE
  7243. .TS
  7244. center box tab ($) ;
  7245. c c l .
  7246. Control$Examples$Explanation
  7247. _
  7248. ^$a^x$superscript
  7249. \&_$a\&_x$subscript
  7250.  @ $ @x or a\&@^b\&_c$phantom box (occupies no width)
  7251.  & $ &{space}$inserts space of specified length
  7252. .TE
  7253. .KE
  7254. .EQ
  7255. delim off
  7256. .EN
  7257.  
  7258.  
  7259. {text} can be used to allow multiple-character text, where only a single
  7260. character is expected (e.g., 2^{10}).  To change the font and/or size, use
  7261. the full form:  {/[fontname][=fontsize] text}   (For example, {/Symbol=20 G}
  7262. is a 20 point GAMMA).  (The \&'/\&' character MUST be the first character after
  7263. the \&'{\&'.)
  7264.  
  7265. If the encoding vector has been changed by \fBset encoding\fR, the default
  7266. encoding vector can be used instead by following the slash with a dash.  This
  7267. is unnecessary if you use the Symbol font, however---since /Symbol uses its
  7268. own encoding vector, \fBgnuplot\fR will not apply any other encoding vector to
  7269. it.
  7270.  
  7271. The phantom box is useful for a@^b_c to align superscripts and subscripts,
  7272. and for overwriting an accent on a letter.  (The latter is tricky; it is much
  7273. easier to use \fBset encoding iso_8859_1\fR to change to the ISO Latin-1 encoding
  7274. vector, which contains a large variety of letters with accents or other
  7275. diacritical marks.)  It is common sense to put the shorter of the two in the
  7276. phantom box.
  7277.  
  7278. Space equal in length to a string can be inserted using the \&'&\&' character.
  7279. Thus
  7280. .br
  7281.         'abc&{def}ghi'
  7282. .br
  7283. would produce
  7284. .br
  7285.         'abc   ghi'.
  7286. .br
  7287.  
  7288. You can access special symbols numerically by specifying \\character-code (in
  7289. octal), e.g., {/Symbol \\245} is the symbol for infinity.
  7290.  
  7291. You can escape control characters using \\, e.g.,  \\\\, \\{, and so on.
  7292.  
  7293. But be aware that strings in double-quotes are parsed differently than those
  7294. enclosed in single-quotes.  The major difference is that backslashes may need
  7295. to be doubled when in double-quoted strings.
  7296.  
  7297. Examples (these are hard to describe in words---try them!):
  7298. .br
  7299.       set xlabel 'Time (10^6 {/Symbol m}s)'
  7300. .br
  7301. .br
  7302.       set title '{/Symbol=18 \\362@_{/=9.6 0}^{/=12 x}} \\
  7303. .br
  7304. .br
  7305.                  {/Helvetica e^{-{/Symbol m}^2/2} d}{/Symbol m}'
  7306. .br
  7307.  
  7308. The file "ps_guide.ps" in the /docs subdirectory of the \fBgnuplot\fR source
  7309. distribution contains more examples of the enhanced syntax.
  7310. .sp 2
  7311. .RE
  7312. .br
  7313. .NH 3
  7314. Pslatex and pstex
  7315. .sp 1
  7316. .LP
  7317. .XS
  7318. Pslatex and pstex
  7319. .XE
  7320. The \fBpslatex\fR and \fBpstex\fR drivers generate output for further processing by
  7321. LaTeX and TeX, respectively.  Figures generated by \fBpstex\fR can be included
  7322. in any plain-based format (including LaTeX).
  7323.  
  7324. Syntax:
  7325. .br
  7326.       set terminal pslatex | |pstex {<color>} {<dashed>} {<rotate>}
  7327. .br
  7328. .br
  7329.                                     {auxfile} {<font_size>}
  7330. .br
  7331.  
  7332. <color> is either \fBcolor\fR or \fBmonochrome\fR.  <rotate> is either \fBrotate\fR or
  7333. \fBnorotate\fR and determines if the y-axis label is rotated.  <font_size> is
  7334. used to scale the font from its usual size.
  7335.  
  7336. If \fBauxfile\fR is specified, it directs the driver to put the PostScript
  7337. commands into an auxiliary file instead of directly into the LaTeX file.
  7338. This is useful if your pictures are large enough that dvips cannot handle
  7339. them.  The name of the auxiliary PostScript file is derived from the name of
  7340. the TeX file given on the \fBset output\fR command; it is determined by replacing
  7341. the trailing \fB.tex\fR (actually just the final extent in the file name---and
  7342. the option will be turned off if there is no extent) with \fB.ps\fR in the output
  7343. file name.  Remember to close the file before leaving \fBgnuplot\fR.
  7344.  
  7345. Examples:
  7346. .br
  7347.       set term pslatex monochrome dashed rotate       # set to defaults
  7348. .br
  7349. To write the PostScript commands into the file "foo.ps":
  7350. .br
  7351.       set term pslatex auxfile
  7352. .br
  7353. .br
  7354.       set output "foo.tex"; plot ...: set output
  7355. .br
  7356. .sp 2
  7357. .NH 3
  7358. Pstricks
  7359. .sp 1
  7360. .LP
  7361. .XS
  7362. Pstricks
  7363. .XE
  7364. The \fBpstricks\fR driver is intended for use with the "pstricks.sty" macro
  7365. package for LaTeX.  It is an alternative to the \fBeepic\fR and \fBlatex\fR drivers.
  7366. You need "pstricks.sty", and, of course, a printer that understands
  7367. PostScript.  Ghostscript understands PostScript, too.
  7368.  
  7369. PSTricks is available via anonymous ftp from the /pub directory at
  7370. Princeton.EDU.  This driver definitely does not come close to using the full
  7371. capability of the PSTricks package.
  7372.  
  7373. Syntax:
  7374. .br
  7375.       set terminal pstricks {hacktext | nohacktext} {unit | nounit}
  7376. .br
  7377.  
  7378. The first option invokes an ugly hack that gives nicer numbers; the second
  7379. has to do with plot scaling.  The defaults are \fBhacktext\fR and \fBnounit\fR.
  7380. .sp 2
  7381. .NH 3
  7382. Qms
  7383. .sp 1
  7384. .LP
  7385. .XS
  7386. Qms
  7387. .XE
  7388. The \fBqms\fR terminal driver supports the QMS/QUIC Laser printer, the Talaris
  7389. 1200 and others.  It has no options.
  7390. .sp 2
  7391. .NH 3
  7392. Regis
  7393. .sp 1
  7394. .LP
  7395. .XS
  7396. Regis
  7397. .XE
  7398. The \fBregis\fR terminal device generates output in the REGIS graphics language.
  7399. It has the option of using 4 (the default) or 16 colors.
  7400.  
  7401. Syntax:
  7402. .br
  7403.       set terminal regis {4 | 16}
  7404. .br
  7405. .sp 2
  7406. .NH 3
  7407. Rgip
  7408. .sp 1
  7409. .LP
  7410. .XS
  7411. Rgip
  7412. .XE
  7413. The \fBrgip\fR and \fBuniplex\fR terminal drivers support RGIP metafiles.  They can
  7414. combine several graphs on a single page, but only one page is allowed in a
  7415. given output file.
  7416.  
  7417. Syntax:
  7418. .br
  7419.       set terminal rgip | uniplex {portrait | landscape}
  7420. .br
  7421. .br
  7422.                                   {[<horiz>,<vert>]} {<fontsize>}
  7423. .br
  7424.  
  7425. permissible values for the font size are in the range 1--8, with the default
  7426. being 1.  The default layout is landscape.  Graphs are placed on the page in
  7427. a \fBhoriz\fRx\fBvert\fR grid, which defaults to [1,1].
  7428.  
  7429. Example:
  7430. .br
  7431.       set terminal uniplex portrait [2,3]
  7432. .br
  7433.  
  7434. puts six graphs on a page in three rows of two in portrait orientation.
  7435. .sp 2
  7436. .NH 3
  7437. Sun
  7438. .sp 1
  7439. .LP
  7440. .XS
  7441. Sun
  7442. .XE
  7443. The \fBsun\fR terminal driver supports the SunView window system.  It has no
  7444. options.
  7445. .sp 2
  7446. .NH 3
  7447. Tek410x
  7448. .sp 1
  7449. .LP
  7450. .XS
  7451. Tek410x
  7452. .XE
  7453. The \fBtek410x\fR terminal driver supports the 410x and 420x family of Tektronix
  7454. terminals.  It has no options.
  7455. .sp 2
  7456. .NH 3
  7457. Table
  7458. .sp 1
  7459. .LP
  7460. .XS
  7461. Table
  7462. .XE
  7463. Instead of producing a picture, the \fBtable\fR terminal prints out evaluation
  7464. results in a multicolumn ASCII table of X Y Z values.  For those times when
  7465. you really want to see the numbers, now you can see them on the screen or
  7466. save to a file.  This can be useful if you want to use the contouring engine
  7467. of \fBgnuplot\fR to work out the contours of your data and then save them for
  7468. further use, perhaps for plotting with \fBplot\fR.  See \fBset contour\fR for an
  7469. example.  The same trick can be used to save gridded data (\fBset dgrid3d\fR).
  7470. .sp 2
  7471. .NH 3
  7472. Tek40
  7473. .sp 1
  7474. .LP
  7475. .XS
  7476. Tek40
  7477. .XE
  7478. This family of terminal drivers supports a variety of VT-like terminals.
  7479. \fBtek40xx\fR supports Tektronix 4010 and others as well as most TEK emulators;
  7480. \fBvttek\fR supports VT-like tek40xx terminal emulators; \fBkc-tek40xx\fR supports
  7481. MS-DOS Kermit Tek4010 terminal emulators in color: \fBkm-tek40xx\fR supports them
  7482. in monochrome; \fBselanar\fR supports Selanar graphics; and \fBbitgraph\fR supports
  7483. BBN Bitgraph terminals.  None have any options.
  7484. .sp 2
  7485. .NH 3
  7486. Texdraw
  7487. .sp 1
  7488. .LP
  7489. .XS
  7490. Texdraw
  7491. .XE
  7492. The \fBtexdraw\fR terminal driver supports the LaTeX texdraw environment.  It is
  7493. intended for use with "texdraw.sty" and "texdraw.tex" in the texdraw package.
  7494. .br
  7495.  It has no options.
  7496. .br
  7497. .sp 2
  7498. .NH 3
  7499. Tgif
  7500. .sp 1
  7501. .LP
  7502. .XS
  7503. Tgif
  7504. .XE
  7505. Tgif is an X11-based drawing tool---it has nothing to do with GIF.
  7506.  
  7507. The \fBtgif\fR driver supports different pointsizes (with \fBset pointsize\fR),
  7508. different label fonts and font sizes (e.g. \fBset label "Hallo" at x,y font
  7509. "Helvetica,34"\fR) and multiple graphs on the page.  The proportions of the
  7510. axes are not changed.
  7511.  
  7512. Syntax:
  7513. .br
  7514.       set terminal tgif {portrait | landscape} {<[x,y]>}
  7515. .br
  7516. .br
  7517.                         {solid | dashed}
  7518. .br
  7519. .br
  7520.                         {"<fontname>"} {<fontsize>}
  7521. .br
  7522.  
  7523. where <[x,y]> specifies the number of graphs in the x and y directions on the
  7524. page, "<fontname>" is the name of a valid PostScript font, and <fontsize>
  7525. specifies the size of the PostScript font.  Defaults are \fBportrait\fR, \fB[1,1]\fR,
  7526. \fBdashed\fR, \fB"Helvetica"\fR, and \fB18\fR.
  7527.  
  7528. The \fBsolid\fR option is usually prefered if lines are colored, as they often
  7529. are in the editor.  Hardcopy will be black-and-white, so \fBdashed\fR should be
  7530. chosen for that.
  7531.  
  7532. Multiplot is implemented in two different ways.
  7533.  
  7534. The first multiplot implementation is the standard gnuplot multiplot feature:
  7535.  
  7536. .br
  7537.       set terminal tgif
  7538. .br
  7539. .br
  7540.       set output "file.obj"
  7541. .br
  7542. .br
  7543.       set multiplot
  7544. .br
  7545. .br
  7546.       set origin x01,y01
  7547. .br
  7548. .br
  7549.       set size  xs,ys
  7550. .br
  7551. .br
  7552.       plot ...
  7553. .br
  7554. .br
  7555.            ...
  7556. .br
  7557. .br
  7558.       set origin x02,y02
  7559. .br
  7560. .br
  7561.       plot ...
  7562. .br
  7563. .br
  7564.       set nomultiplot
  7565. .br
  7566.  
  7567. See \fBset multiplot\fR for further information.
  7568.  
  7569. The second version is the [x,y] option for the driver itself.  The advantage
  7570. of this implementation is that everything is scaled and placed automatically
  7571. without the need for setting origins and sizes; the graphs keep their natural
  7572. x/y proportions of 3/2 (or whatever is fixed by \fBset size\fR).
  7573.  
  7574. If both multiplot methods are selected, the standard method is chosen and a
  7575. warning message is given.
  7576.  
  7577. Examples of single plots (or standard multiplot):
  7578. .br
  7579.       set terminal tgif                  # defaults
  7580. .br
  7581. .br
  7582.       set terminal tgif "Times-Roman" 24
  7583. .br
  7584. .br
  7585.       set terminal tgif landscape
  7586. .br
  7587. .br
  7588.       set terminal tgif landscape solid
  7589. .br
  7590.  
  7591. Examples using the built-in multiplot mechanism:
  7592. .br
  7593.       set terminal tgif portrait [2,4]  # portrait; 2 plots in the x-
  7594. .br
  7595. .br
  7596.                                         # and 4 in the y-direction
  7597. .br
  7598. .br
  7599.       set terminal tgif [1,2]           # portrait; 1 plot in the x-
  7600. .br
  7601. .br
  7602.                                         # and 2 in the y-direction
  7603. .br
  7604. .br
  7605.       set terminal tgif landscape [3,3] # landscape; 3 plots in both
  7606. .br
  7607. .br
  7608.                                         # directions
  7609. .br
  7610. .sp 2
  7611. .NH 3
  7612. Tkcanvas
  7613. .sp 1
  7614. .LP
  7615. .XS
  7616. Tkcanvas
  7617. .XE
  7618. This terminal driver generates tk canvas widget commands.  To use it, rebuild
  7619. \fBgnuplot\fR (after uncommenting or inserting the appropriate line in "term.h"),
  7620. then
  7621.  
  7622. .br
  7623.  gnuplot> set term tkcanvas
  7624. .br
  7625. .br
  7626.  gnuplot> set output 'plot.file'
  7627. .br
  7628.  
  7629. After invoking "wish", execute the following sequence of tcl commands:
  7630.  
  7631. .br
  7632.  % source plot.file
  7633. .br
  7634. .br
  7635.  % canvas .c
  7636. .br
  7637. .br
  7638.  % pack .c
  7639. .br
  7640. .br
  7641.  % gnuplot .c
  7642. .br
  7643.  
  7644. The code generated by \fBgnuplot\fR creates a tcl procedure called "gnuplot"
  7645. that takes the name of a canvas as its argument.  When the procedure is,
  7646. called, it clears the canvas, finds the size of the canvas and draws the plot
  7647. in it, scaled to fit.
  7648.  
  7649. The current version of \fBtkcanvas\fR supports neither \fBmultiplot\fR nor \fBreplot\fR.
  7650. .sp 2
  7651. .NH 3
  7652. Tpic
  7653. .sp 1
  7654. .LP
  7655. .XS
  7656. Tpic
  7657. .XE
  7658. The \fBtpic\fR terminal driver supports the LaTeX picture environment with tpic
  7659. \\specials.  It is an alternative to the \fBlatex\fR and \fBeepic\fR terminal drivers.
  7660. Options are the point size, line width, and dot-dash interval.
  7661.  
  7662. Syntax:
  7663. .br
  7664.       set terminal tpic <pointsize> <linewidth> <interval>
  7665. .br
  7666.  
  7667. where \fBpointsize\fR and \fBlinewidth\fR are integers in milli-inches and \fBinterval\fR
  7668. is a float in inches.  If a non-positive value is specified, the default is
  7669. chosen: pointsize = 40, linewidth = 6, interval = 0.1.
  7670. .sp 2
  7671. .NH 3
  7672. Unixpc
  7673. .sp 1
  7674. .LP
  7675. .XS
  7676. Unixpc
  7677. .XE
  7678. The \fBunixpc\fR terminal driver supports AT&T 3b1 and AT&T 7300 Unix PC.  It has
  7679. no options.
  7680. .sp 2
  7681. .NH 3
  7682. Unixplot
  7683. .sp 1
  7684. .LP
  7685. .XS
  7686. Unixplot
  7687. .XE
  7688. The \fBunixplot\fR terminal driver generates output in the Unix "plot" graphics
  7689. language.  It has no options.
  7690. This terminal cannot be compiled if the GNU version of plot is to be used; in
  7691. that case, use the \fBgnugraph\fR terminal instead.
  7692. .sp 2
  7693. .NH 3
  7694. Vx384
  7695. .sp 1
  7696. .LP
  7697. .XS
  7698. Vx384
  7699. .XE
  7700. The \fBvx384\fR terminal driver supports the Vectrix 384 and Tandy color
  7701. printers.  It has no options.
  7702. .sp 2
  7703. .NH 3
  7704. Vws
  7705. .sp 1
  7706. .LP
  7707. .XS
  7708. Vws
  7709. .XE
  7710. The \fBvws\fR terminal driver supports the VAX Windowing System.  It has no
  7711. options.
  7712. .sp 2
  7713. .NH 3
  7714. Windows
  7715. .sp 1
  7716. .LP
  7717. .XS
  7718. Windows
  7719. .XE
  7720. Three options may be set in the \fBwindows\fR terminal driver.
  7721.  
  7722. Syntax:
  7723. .br
  7724.       set terminal windows {<color>} {"<fontname>"} {<fontsize>}
  7725. .br
  7726.  
  7727. where \fB<color>\fR is either \fBcolor\fR or \fBmonochrome\fR, \fB"<fontname>"\fR is the
  7728. name of a valid Windows font, and \fB<fontsize>\fR is the size of the font in
  7729. points.
  7730. .sp 2
  7731. .RS
  7732. .IP
  7733. .NH 4
  7734. Graph-menu
  7735. .sp 1
  7736. .LP
  7737. .XS
  7738. Graph-menu
  7739. .XE
  7740. The \fBgnuplot graph\fR window has the following options on a pop-up menu
  7741. accessed by pressing the right mouse button or selecting \fBOptions\fR from the
  7742. system menu:
  7743.  
  7744. \fBBring to Top\fR when checked brings the graph window to the top after every
  7745. plot.
  7746.  
  7747. \fBColor\fR when checked enables color linestyles.  When unchecked it forces
  7748. monochrome linestyles.
  7749.  
  7750. \fBCopy to Clipboard\fR copies a bitmap and a Metafile picture.
  7751.  
  7752. \fBBackground...\fR sets the window background color.
  7753.  
  7754. \fBChoose Font...\fR selects the font used in the graphics window.
  7755.  
  7756. \fBLine Styles...\fR allows customization of the line colors and styles.
  7757.  
  7758. \fBPrint...\fR prints the graphics windows using a Windows printer driver and
  7759. allows selection of the printer and scaling of the output.  The output
  7760. produced by \fBPrint\fR is not as good as that from \fBgnuplot\fR\&'s own printer
  7761. drivers.
  7762.  
  7763. \fBUpdate wgnuplot.ini\fR saves the current window locations, window sizes, text
  7764. window font, text window font size, graph window font, graph window font
  7765. size, background color and linestyles to the initialization file
  7766. \fBWGNUPLOT.INI\fR.
  7767. .sp 2
  7768. .NH 4
  7769. Printing
  7770. .sp 1
  7771. .LP
  7772. .XS
  7773. Printing
  7774. .XE
  7775. In order of preference, graphs may be be printed in the following ways.
  7776.  
  7777. \fB1.\fR Use the \fBgnuplot\fR command \fBset terminal\fR to select a printer and \fBset
  7778. output\fR to redirect output to a file.
  7779.  
  7780. \fB2.\fR Select the \fBPrint...\fR command from the \fBgnuplot graph\fR window.  An extra
  7781. command \fBscreendump\fR does this from the text window.
  7782.  
  7783. \fB3.\fR If \fBset output "PRN"\fR is used, output will go to a temporary file.  When
  7784. you exit from \fBgnuplot\fR or when you change the output with another \fBset
  7785. output\fR command, a dialog box will appear for you to select a printer port.
  7786. If you choose OK, the output will be printed on the selected port, passing
  7787. unmodified through the print manager.  It is possible to accidentally (or
  7788. deliberately) send printer output meant for one printer to an incompatible
  7789. printer.
  7790. .sp 2
  7791. .NH 4
  7792. Text-menu
  7793. .sp 1
  7794. .LP
  7795. .XS
  7796. Text-menu
  7797. .XE
  7798. The \fBgnuplot text\fR window has the following options on a pop-up menu accessed
  7799. by pressing the right mouse button or selecting \fBOptions\fR from the system
  7800. menu:
  7801.  
  7802. \fBCopy to Clipboard\fR copies marked text to the clipboard.
  7803.  
  7804. \fBPaste\fR copies text from the clipboard as if typed by the user.
  7805.  
  7806. \fBChoose Font...\fR selects the font used in the text window.
  7807.  
  7808. \fBSystem Colors\fR when selected makes the text window honor the System Colors
  7809. set using the Control Panel.  When unselected, text is black or blue on a
  7810. white background.
  7811.  
  7812. \fBUpdate wgnuplot.ini\fR saves the current text window location, text window
  7813. size, text window font and text window font size to the initialisation file
  7814. \fBWGNUPLOT.INI\fR.
  7815.  
  7816. \fBMENU BAR\fR
  7817.  
  7818. If the menu file \fBWGNUPLOT.MNU\fR is found in the same directory as
  7819. WGNUPLOT.EXE, then the menu specified in \fBWGNUPLOT.MNU\fR will be loaded.
  7820. Menu commands:
  7821.  
  7822. [Menu] starts a new menu with the name on the following line.
  7823.  
  7824. [EndMenu] ends the current menu.
  7825.  
  7826. [--] inserts a horizontal menu separator.
  7827.  
  7828. [|] inserts a vertical menu separator.
  7829.  
  7830. [Button] puts the next macro on a push button instead of a menu.
  7831.  
  7832. Macros take two lines with the macro name (menu entry) on the first line and
  7833. the macro on the second line.  Leading spaces are ignored.  Macro commands:
  7834.  
  7835. [INPUT] --- Input string with prompt terminated by [EOS] or {ENTER}
  7836.  
  7837. [EOS] --- End Of String terminator.  Generates no output.
  7838.  
  7839. [OPEN] --- Get name of file to open from list box, with title of list box
  7840. terminated by [EOS], followed by default filename terminated by [EOS] or
  7841. {ENTER}.  This uses COMMDLG.DLL from Windows 3.1.
  7842.  
  7843. [SAVE] --- Get name of file to save.  Similar to [OPEN]
  7844.  
  7845. Macro character substitutions:
  7846.  
  7847. {ENTER} --- Carriage Return \&'\\r\&'
  7848.  
  7849. {TAB} --- Tab \&'\\011\&'
  7850.  
  7851. {ESC} --- Escape \&'\\033\&'
  7852.  
  7853. {^A} --- \&'\\001\&'
  7854.  
  7855. \&...
  7856.  
  7857. {^_} --- \&'\\031\&'
  7858.  
  7859. Macros are limited to 256 characters after expansion.
  7860. .sp 2
  7861. .NH 4
  7862. Wgnuplot.ini
  7863. .sp 1
  7864. .LP
  7865. .XS
  7866. Wgnuplot.ini
  7867. .XE
  7868. Windows \fBgnuplot\fR will read some of its options from the \fB[WGNUPLOT]\fR section
  7869. of \fBWGNUPLOT.INI\fR in the Windows directory.  A sample \fBWGNUPLOT.INI\fR file:
  7870.  
  7871. .br
  7872.       [WGNUPLOT]
  7873. .br
  7874. .br
  7875.       TextOrigin=0 0
  7876. .br
  7877. .br
  7878.       TextSize=640 150
  7879. .br
  7880. .br
  7881.       TextFont=Terminal,9
  7882. .br
  7883. .br
  7884.       GraphOrigin=0 150
  7885. .br
  7886. .br
  7887.       GraphSize=640 330
  7888. .br
  7889. .br
  7890.       GraphFont=Arial,10
  7891. .br
  7892. .br
  7893.       GraphColor=1
  7894. .br
  7895. .br
  7896.       GraphToTop=1
  7897. .br
  7898. .br
  7899.       GraphBackground=255 255 255
  7900. .br
  7901. .br
  7902.       Border=0 0 0 0 0
  7903. .br
  7904. .br
  7905.       Axis=192 192 192 2 2
  7906. .br
  7907. .br
  7908.       Line1=0 0 255 0 0
  7909. .br
  7910. .br
  7911.       Line2=0 255 0 0 1
  7912. .br
  7913. .br
  7914.       Line3=255 0 0 0 2
  7915. .br
  7916. .br
  7917.       Line4=255 0 255 0 3
  7918. .br
  7919. .br
  7920.       Line5=0 0 128 0 4
  7921. .br
  7922.  
  7923. The \fBGraphFont\fR entry specifies the font name and size in points.  The five
  7924. numbers given in the \fBBorder\fR, \fBAxis\fR and \fBLine\fR entries are the \fBRed\fR
  7925. intensity (0--255), \fBGreen\fR intensity, \fBBlue\fR intensity, \fBColor Linestyle\fR
  7926. and \fBMono Linestyle\fR.  \fBLinestyles\fR are 0=SOLID, 1=DASH, 2=DOT, 3=DASHDOT,
  7927. 4=DASHDOTDOT.  In the sample \fBWGNUPLOT.INI\fR file above, Line 2 is a green
  7928. solid line in color mode, or a dashed line in monochrome mode.  The default
  7929. line width is 1 pixel.  If \fBLinestyle\fR is negative, it specifies the width of
  7930. a SOLID line in pixels.  Line1 and any linestyle used with the \fBpoints\fR style
  7931. must be SOLID with unit width.
  7932. .sp 2
  7933. .NH 4
  7934. Windows3.0
  7935. .sp 1
  7936. .LP
  7937. .XS
  7938. Windows3.0
  7939. .XE
  7940. Windows 3.1 is preferred, but WGNUPLOT will run under Windows 3.0 with the
  7941. following restrictions:
  7942. \fB1.\fR COMMDLG.DLL and SHELL.DLL (available with Windows 3.1 or Borland C++
  7943. 3.1) must be in the windows directory.
  7944.  
  7945. \fB2.\fR WGNUPLOT.HLP produced by Borland C++ 3.1 is in Windows 3.1 format.
  7946. You need to use the WINHELP.EXE supplied with Borland C++ 3.1.
  7947.  
  7948. \fB3.\fR It will not run in real mode due to lack of memory.
  7949.  
  7950. \fB4.\fR TrueType fonts are not available in the graph window.
  7951.  
  7952. \fB5.\fR Drag-drop does not work.
  7953. .sp 2
  7954. .RE
  7955. .br
  7956. .NH 3
  7957. X11
  7958. .sp 1
  7959. .LP
  7960. .XS
  7961. X11
  7962. .XE
  7963. \fBgnuplot\fR provides the \fBx11\fR terminal type for use with X servers.  This
  7964. terminal type is set automatically at startup if the \fBDISPLAY\fR environment
  7965. variable is set, if the \fBTERM\fR environment variable is set to \fBxterm\fR, or
  7966. if the \fB-display\fR command line option is used.
  7967.  
  7968. Syntax:
  7969. .br
  7970.       set terminal x11 {reset} {<n>}
  7971. .br
  7972.  
  7973. Multiple plot windows are supported: \fBset terminal x11 <n>\fR directs the
  7974. output to plot window number n.  If n>0, the terminal number will be
  7975. appended to the window title and the icon will be labeled \fBgplt <n>\fR.
  7976. The active window may distinguished by a change in cursor (from default
  7977. to crosshair.)
  7978.  
  7979. Plot windows remain open even when the \fBgnuplot\fR driver is changed to a
  7980. different device.  A plot window can be closed by pressing the letter q
  7981. while that window has input focus, or by choosing \fBclose\fR from a window
  7982. manager menu.
  7983.  
  7984. All plot windows can be closed by specifying \fBreset\fR, which actually
  7985. terminates the subprocess which maintains the windows (unless -persist was
  7986. specified).
  7987.  
  7988. For terminal type \fBx11\fR, \fBgnuplot\fR accepts (when initialized) the standard
  7989. X Toolkit options and resources such as geometry, font, and background from
  7990. from the command line arguments or a configuration file.  See the X(1) man
  7991. page (or its equivalent) for a description of the options.
  7992.  
  7993. Many other options are available for the \fBx11\fR terminal.  These may be
  7994. specified either as command-line options when \fBgnuplot\fR is invoked or as
  7995. resources in the configuration file "/.Xdefaults".  Thus they are chosen
  7996. at start-up time and cannot be altered during a single \fBgnuplot\fR session.
  7997. .sp 2
  7998. .RS
  7999. .IP
  8000. .NH 4
  8001. Command-line-options
  8002. .sp 1
  8003. .LP
  8004. .XS
  8005. Command-line-options
  8006. .XE
  8007. In addition to the X Toolkit options, the following options may be specified
  8008. on the command line when starting \fBgnuplot\fR or as resources in your
  8009. ".Xdefaults" file:
  8010.  
  8011. .EQ
  8012. delim $$
  8013. .EN
  8014. .KS
  8015. .TS
  8016. center box tab (@) ;
  8017. c c l .
  8018. `-mono`@@forces monochrome rendering on color displays.
  8019. `-gray`@@requests grayscale rendering on grayscale or color displays.
  8020.        @@(Grayscale displays receive monochrome rendering by default.)
  8021. `-clear`@@requests that the window be cleared momentarily before a
  8022.         @@new plot is displayed.
  8023. `-tvtwm`@@requests that geometry specifications for position of the
  8024.         @@window be made relative to the currently displayed portion
  8025.         @@of the virtual root.
  8026. `-raise`@@raise plot window after each plot
  8027. `-noraise`@@do not raise plot window after each plot
  8028. `-persist`@@plot windows survive after main gnuplot program exits
  8029. .TE
  8030. .KE
  8031. .EQ
  8032. delim off
  8033. .EN
  8034.  
  8035. The options are shown above in their command-line syntax.  When entered as
  8036. resources in ".Xdefaults", they require a different syntax.
  8037.  
  8038. Example:
  8039. .br
  8040.       gnuplot*gray: on
  8041. .br
  8042.  
  8043. \fBgnuplot\fR provides a command line option (\fB-pointsize v\fR) and a resource
  8044. (\fBgnuplot*pointsize: v\fR) to control the size of points plotted with the
  8045. \fBpoints\fR plotting style.  The value \fBv\fR is a real number (greater than 0 and
  8046. less than or equal to ten) used as a scaling factor for point sizes.  For
  8047. example, \fB-pointsize 2\fR uses points twice the default size, and \fB-pointsize\fR
  8048. \fB0.5\fR uses points half the normal size.
  8049.  
  8050. Plot windows will automatically be closed at the end of the session
  8051. unless the \fB-persist\fR option was given.
  8052.  
  8053. For monochrome displays, \fBgnuplot\fR does not honor foreground or background
  8054. colors.  The default is black-on-white.  \fB-rv\fR or \fBgnuplot*reverseVideo: on\fR
  8055. requests white-on-black.
  8056.  
  8057. For color displays, \fBgnuplot\fR honors the following resources (shown here with
  8058. their default values).  The values may be color names as listed in the X11
  8059. rgb.txt file on your system, hexadecimal RGB color specifications (see X11
  8060. documentation), or a color name followed by a comma and an \fBintensity\fR value
  8061. from 0 to 1.  For example, \fBblue,.5\fR means a half intensity blue.
  8062.  
  8063. .EQ
  8064. delim $$
  8065. .EN
  8066. .KS
  8067. .TS
  8068. center box tab (@) ;
  8069. c c l .
  8070. @@gnuplot*background: white
  8071. @@gnuplot*textColor: black
  8072. @@gnuplot*borderColor: black
  8073. @@gnuplot*axisColor: black
  8074. @@gnuplot*line1Color: red
  8075. @@gnuplot*line2Color: green
  8076. @@gnuplot*line3Color: blue
  8077. @@gnuplot*line4Color: magenta
  8078. @@gnuplot*line5Color: cyan
  8079. @@gnuplot*line6Color: sienna
  8080. @@gnuplot*line7Color: orange
  8081. @@gnuplot*line8Color: coral
  8082. .TE
  8083. .KE
  8084. .EQ
  8085. delim off
  8086. .EN
  8087.  
  8088.  
  8089. The command-line syntax for these is, for example,
  8090.  
  8091. Example:
  8092. .br
  8093.       gnuplot -background coral
  8094. .br
  8095.  
  8096. When \fB-gray\fR is selected, \fBgnuplot\fR honors the following resources for
  8097. grayscale or color displays (shown here with their default values).  Note
  8098. that the default background is black.
  8099.  
  8100. .EQ
  8101. delim $$
  8102. .EN
  8103. .KS
  8104. .TS
  8105. center box tab (@) ;
  8106. c c l .
  8107. @@gnuplot*background: black
  8108. @@gnuplot*textGray: white
  8109. @@gnuplot*borderGray: gray50
  8110. @@gnuplot*axisGray: gray50
  8111. @@gnuplot*line1Gray: gray100
  8112. @@gnuplot*line2Gray: gray60
  8113. @@gnuplot*line3Gray: gray80
  8114. @@gnuplot*line4Gray: gray40
  8115. @@gnuplot*line5Gray: gray90
  8116. @@gnuplot*line6Gray: gray50
  8117. @@gnuplot*line7Gray: gray70
  8118. @@gnuplot*line8Gray: gray30
  8119. .TE
  8120. .KE
  8121. .EQ
  8122. delim off
  8123. .EN
  8124.  
  8125.  
  8126. \fBgnuplot\fR honors the following resources for setting the width (in pixels) of
  8127. plot lines (shown here with their default values.)  0 or 1 means a minimal
  8128. width line of 1 pixel width.  A value of 2 or 3 may improve the appearance of
  8129. some plots.
  8130.  
  8131. .EQ
  8132. delim $$
  8133. .EN
  8134. .KS
  8135. .TS
  8136. center box tab (@) ;
  8137. c c l .
  8138. @@gnuplot*borderWidth: 2
  8139. @@gnuplot*axisWidth: 0
  8140. @@gnuplot*line1Width: 0
  8141. @@gnuplot*line2Width: 0
  8142. @@gnuplot*line3Width: 0
  8143. @@gnuplot*line4Width: 0
  8144. @@gnuplot*line5Width: 0
  8145. @@gnuplot*line6Width: 0
  8146. @@gnuplot*line7Width: 0
  8147. @@gnuplot*line8Width: 0
  8148. .TE
  8149. .KE
  8150. .EQ
  8151. delim off
  8152. .EN
  8153.  
  8154.  
  8155. \fBgnuplot\fR honors the following resources for setting the dash style used for
  8156. plotting lines.  0 means a solid line.  A two-digit number \fBjk\fR (\fBj\fR and \fBk\fR
  8157. are >= 1  and <= 9) means a dashed line with a repeated pattern of \fBj\fR pixels
  8158. on followed by \fBk\fR pixels off.  For example, \&'16\&' is a "dotted" line with one
  8159. pixel on followed by six pixels off.  More elaborate on/off patterns can be
  8160. specified with a four-digit value.  For example, \&'4441\&' is four on, four off,
  8161. four on, one off.  The default values shown below are for monochrome displays
  8162. or monochrome rendering on color or grayscale displays.  For color displays,
  8163. the default for each is 0 (solid line) except for \fBaxisDashes\fR which defaults
  8164. to a \&'16\&' dotted line.
  8165.  
  8166. .EQ
  8167. delim $$
  8168. .EN
  8169. .KS
  8170. .TS
  8171. center box tab (@) ;
  8172. c c l .
  8173. @@gnuplot*borderDashes: 0
  8174. @@gnuplot*axisDashes: 16
  8175. @@gnuplot*line1Dashes: 0
  8176. @@gnuplot*line2Dashes: 42
  8177. @@gnuplot*line3Dashes: 13
  8178. @@gnuplot*line4Dashes: 44
  8179. @@gnuplot*line5Dashes: 15
  8180. @@gnuplot*line6Dashes: 4441
  8181. @@gnuplot*line7Dashes: 42
  8182. @@gnuplot*line8Dashes: 13
  8183. .TE
  8184. .KE
  8185. .EQ
  8186. delim off
  8187. .EN
  8188.  
  8189.  
  8190. The size or aspect ratio of a plot may be changed by resizing the \fBgnuplot\fR
  8191. window.
  8192. .sp 2
  8193. .RE
  8194. .br
  8195. .NH 3
  8196. Xlib
  8197. .sp 1
  8198. .LP
  8199. .XS
  8200. Xlib
  8201. .XE
  8202. The \fBxlib\fR terminal driver supports the X11 Windows System.  It generates
  8203. gnulib_x11 commands.  \fBset term x11\fR behaves similarly to \fBset terminal xlib;
  8204. set output "|gnuplot_x11"\fR.  \fBxlib\fR has no options, but see \fBx11\fR.
  8205. .sp 2
  8206. .RE
  8207. .br
  8208. .NH 2
  8209. Tics
  8210. .sp 1
  8211. .LP
  8212. .XS
  8213. Tics
  8214. .XE
  8215. The \fBset tics\fR command can be used to change the tics to be drawn outwards.
  8216.  
  8217. Syntax:
  8218. .br
  8219.       set tics {<direction>}
  8220. .br
  8221. .br
  8222.       show tics
  8223. .br
  8224.  
  8225. where <direction> may be \fBin\fR (the default) or \fBout\fR.
  8226.  
  8227. See also \fBset xtics\fR for more control of major (labelled) tic marks and \fBset
  8228. mxtics\fR for control of minor tic marks.
  8229. .sp 2
  8230. .NH 2
  8231. Ticslevel
  8232. .sp 1
  8233. .LP
  8234. .XS
  8235. Ticslevel
  8236. .XE
  8237. Using \fBsplot\fR, one can adjust the relative height of the vertical (Z) axis
  8238. using \fBset ticslevel\fR.  The numeric argument provided specifies the location
  8239. of the bottom of the scale (as a fraction of the z-range) above the xy-plane.
  8240. The default value is 0.5.  Negative values are permitted, but tic labels on
  8241. the three axes may overlap.
  8242.  
  8243. To place the xy-plane at a position \&'pos\&' on the z-axis, \fBticslevel\fR should
  8244. be set equal to  (pos - zmin) / (zmin - zmax).
  8245.  
  8246. Syntax:
  8247. .br
  8248.       set ticslevel {<level>}
  8249. .br
  8250. .br
  8251.       show tics
  8252. .br
  8253.  
  8254. See also \fBset view\fR.
  8255. .sp 2
  8256. .NH 2
  8257. Ticscale
  8258. .sp 1
  8259. .LP
  8260. .XS
  8261. Ticscale
  8262. .XE
  8263. The size of the tic marks can be adjusted with \fBset ticscale\fR.
  8264.  
  8265. Syntax:
  8266. .br
  8267.       set ticscale {<major> {<minor>}}
  8268. .br
  8269. .br
  8270.       show tics
  8271. .br
  8272.  
  8273. If <minor> is not specified, it is 0.5*<major>.  The default size is 1.0 for
  8274. major tics and 0.5 for minor tics.  Note that it is possible to have the tic
  8275. marks pointing outward by specifying a negative size.
  8276. .sp 2
  8277. .NH 2
  8278. Timestamp
  8279. .sp 1
  8280. .LP
  8281. .XS
  8282. Timestamp
  8283. .XE
  8284. The command \fBset timestamp\fR places the time and date of the plot in the left
  8285. margin.
  8286.  
  8287. Syntax:
  8288. .br
  8289.       set timestamp {"<format>"} {top|bottom} {{no}rotate}
  8290. .br
  8291. .br
  8292.                     {<xoff>}{,<yoff>} {"<font>"}
  8293. .br
  8294. .br
  8295.       set notimestamp
  8296. .br
  8297. .br
  8298.       show timestamp
  8299. .br
  8300.  
  8301. The format string allows you to choose the format used to write the date and
  8302. time.  Its default value is what asctime() uses: "%a %b %d %H:%M:%S %Y"
  8303. (weekday, month name, day of the month, hours, minutes, seconds, four-digit
  8304. year).  With \fBtop\fR or \fBbottom\fR you can place the timestamp at the top or
  8305. bottom of the left margin (default: bottom).  \fBrotate\fR lets you write the
  8306. timestamp vertically, if your terminal supports vertical text.  The constants
  8307. <xoff> and <off> are offsets from the default position given in character
  8308. screen coordinates.  <font> is used to specify the font with which the time
  8309. is to be written.
  8310.  
  8311. The abbreviation \fBtime\fR may be used in place of \fBtimestamp\fR.
  8312.  
  8313. Example:
  8314. .br
  8315.       set timestamp "%d/%m/%y %H:%M" 80,-2 "Helvetica"
  8316. .br
  8317.  
  8318. See \fBset timefmt\fR for more information about time format strings.
  8319. .sp 2
  8320. .NH 2
  8321. Timefmt
  8322. .sp 1
  8323. .LP
  8324. .XS
  8325. Timefmt
  8326. .XE
  8327. This command applies to timeseries where data are composed of dates/times.
  8328. It has no meaning unless the command \fBset xdata time\fR is given also.
  8329.  
  8330. Syntax:
  8331. .br
  8332.       set timefmt "<format string>"
  8333. .br
  8334. .br
  8335.       show timefmt
  8336. .br
  8337.  
  8338. The string argument tells \fBgnuplot\fR how to read timedata from the datafile.
  8339. The valid formats are:
  8340.  
  8341.  
  8342. .EQ
  8343. delim $$
  8344. .EN
  8345. .KS
  8346. .TS
  8347. center box tab (@) ;
  8348. c c l .
  8349. Format@Explanation
  8350. _
  8351. %d@day of the month, 1--31
  8352. %m@month of the year, 1--12
  8353. %y@year, 0--99
  8354. %Y@year, 4-digit
  8355. %j@day of the year, 1--365
  8356. %H@hour, 0--24
  8357. %M@minute, 0--60
  8358. %S@second, 0--60
  8359. %b@three-character abbreviation of the name of the month
  8360. %B@name of the month
  8361. _
  8362. .TE
  8363. .KE
  8364. .EQ
  8365. delim off
  8366. .EN
  8367.  
  8368. Any character is allowed in the string, but must match exactly.  \\t (tab) is
  8369. recognized.  Backslash-octals (\\nnn) are converted to char.  If there is no
  8370. separating character between the date/time elements, then %d, %m, %y, %H, %M
  8371. and %S read two digits each, %Y reads four digits and %j reads three digits.
  8372. %b requires three characters, and %B requires as many as it needs.
  8373.  
  8374. Spaces are treated slightly differently.  A space in the string stands for
  8375. zero or more whitespace characters in the file.  That is, "%H %M" can be used
  8376. to read "1220" and "12     20" as well as "12 20".
  8377.  
  8378. Each set of non-blank characters in the timedata counts as one column in the
  8379. \fBusing n:n\fR specification.  Thus \fB11:11  25/12/76  21.0\fR consists of three
  8380. columns.  To avoid confusion, \fBgnuplot\fR requires that you provide a complete
  8381. \fBusing\fR specification if your file contains timedata.
  8382.  
  8383. Since \fBgnuplot\fR cannot read non-numerical text, if the date format includes
  8384. the day or month in words, the format string must exclude this text.  But
  8385. it can still be printed with the "%a", "%A", "%b", or "%B" specifier: see
  8386. \fBset format\fR for more details about these and other options for printing
  8387. timedata.  (\fBgnuplot\fR will determine the proper month and weekday from the
  8388. numerical values.)
  8389.  
  8390. See also \fBset xdata\fR and \fBTime/date\fR for more information.
  8391.  
  8392. Example:
  8393. .br
  8394.       set timefmt "%d/%m/%Y\\t%H:%M"
  8395. .br
  8396. tells \fBgnuplot\fR to read date and time separated by tab.  (But look closely at
  8397. your data---what began as a tab may have been converted to spaces somewhere
  8398. along the line; the format string must match what is actually in the file.)
  8399. .sp 2
  8400. .NH 2
  8401. Title
  8402. .sp 1
  8403. .LP
  8404. .XS
  8405. Title
  8406. .XE
  8407. The \fBset title\fR command produces a plot title that is centered at the top of
  8408. the plot.  \fBset title\fR is a special case of \fBset label\fR.
  8409.  
  8410. Syntax:
  8411. .br
  8412.       set title {"<title-text>"} {<xoff>}{,<yoff>} {"<font>,{<size>}"}
  8413. .br
  8414. .br
  8415.       show title
  8416. .br
  8417.  
  8418. Specifying constants <xoff> or <yoff> as optional offsets for the title will
  8419. move the title <xoff> or <yoff> character screen coordinates (not graph
  8420. coordinates).  For example, "\fBset title ,-1\fR" will change only the y offset
  8421. of the title, moving the title down by roughly the height of one character.
  8422.  
  8423. <font> is used to specify the font with which the title is to be written;
  8424. the units of the font <size> depend upon which terminal is used.
  8425.  
  8426. \fBset title\fR with no parameters clears the title.
  8427.  
  8428. See \fBsyntax\fR for details about the processing of backslash sequences and
  8429. the distinction between single- and double-quotes.
  8430. .sp 2
  8431. .NH 2
  8432. Tmargin
  8433. .sp 1
  8434. .LP
  8435. .XS
  8436. Tmargin
  8437. .XE
  8438. The command \fBset tmargin\fR sets the size of the top margin.  Please see
  8439. \fBset margin\fR for details.
  8440. .sp 2
  8441. .NH 2
  8442. Trange
  8443. .sp 1
  8444. .LP
  8445. .XS
  8446. Trange
  8447. .XE
  8448. The \fBset trange\fR command sets the parametric range used to compute x and y
  8449. values when in parametric or polar modes.  Please see \fBset xrange\fR for
  8450. details.
  8451. .sp 2
  8452. .NH 2
  8453. Urange
  8454. .sp 1
  8455. .LP
  8456. .XS
  8457. Urange
  8458. .XE
  8459. The \fBset urange\fR and \fBset vrange\fR commands set the parametric ranges used
  8460. to compute x, y, and z values when in \fBsplot\fR parametric mode.  Please see
  8461. \fBset xrange\fR for details.
  8462. .sp 2
  8463. .NH 2
  8464. Variables
  8465. .sp 1
  8466. .LP
  8467. .XS
  8468. Variables
  8469. .XE
  8470. The \fBshow variables\fR command lists all user-defined variables and their
  8471. values.
  8472.  
  8473. Syntax:
  8474. .br
  8475.       show variables
  8476. .br
  8477. .sp 2
  8478. .NH 2
  8479. View
  8480. .sp 1
  8481. .LP
  8482. .XS
  8483. View
  8484. .XE
  8485. The \fBset view\fR command sets the viewing angle for \fBsplot\fRs.  It controls how
  8486. the 3-d coordinates of the plot are mapped into the 2-d screen space.  It
  8487. provides controls for both rotation and scaling of the plotted data, but
  8488. supports orthographic projections only.
  8489.  
  8490. Syntax:
  8491. .br
  8492.       set view <rot_x> {,{<rot_z>}{,{<scale>}{,<scale_z>}}}
  8493. .br
  8494. .br
  8495.       show view
  8496. .br
  8497.  
  8498. where <rot_x> and <rot_z> control the rotation angles (in degrees) in a
  8499. virtual 3-d coordinate system aligned with the screen such that initially
  8500. (that is, before the rotations are performed) the screen horizontal axis is
  8501. x, screen vertical axis is y, and the axis perpendicular to the screen is z.
  8502. The first rotation applied is <rot_x> around the x axis.  The second rotation
  8503. applied is <rot_z> around the new z axis.
  8504.  
  8505. <rot_x> is bounded to the [0:180] range with a default of 60 degrees, while
  8506. <rot_z> is bounded to the [0:360] range with a default of 30 degrees.
  8507. <scale> controls the scaling of the entire \fBsplot\fR, while <scale_z> scales
  8508. the z axis only.  Both scales default to 1.0.
  8509.  
  8510. Examples:
  8511. .br
  8512.       set view 60, 30, 1, 1
  8513. .br
  8514. .br
  8515.       set view ,,0.5
  8516. .br
  8517.  
  8518. The first sets all the four default values.  The second changes only scale,
  8519. to 0.5.
  8520.  
  8521. See also \fBset ticslevel\fR.
  8522. .sp 2
  8523. .NH 2
  8524. Vrange
  8525. .sp 1
  8526. .LP
  8527. .XS
  8528. Vrange
  8529. .XE
  8530. The \fBset urange\fR and \fBset vrange\fR commands set the parametric ranges used
  8531. to compute x, y, and z values when in \fBsplot\fR parametric mode.  Please see
  8532. \fBset xrange\fR for details.
  8533. .sp 2
  8534. .NH 2
  8535. X2data
  8536. .sp 1
  8537. .LP
  8538. .XS
  8539. X2data
  8540. .XE
  8541. The \fBset x2data\fR command sets data on the x2 (top) axis to timeseries
  8542. (dates/times).  Please see \fBset xdata\fR.
  8543. .sp 2
  8544. .NH 2
  8545. X2dtics
  8546. .sp 1
  8547. .LP
  8548. .XS
  8549. X2dtics
  8550. .XE
  8551. The \fBset x2dtics\fR command changes tics on the x2 (top) axis to days of the
  8552. week.  Please see \fBset xmtics\fR for details.
  8553. .sp 2
  8554. .NH 2
  8555. X2label
  8556. .sp 1
  8557. .LP
  8558. .XS
  8559. X2label
  8560. .XE
  8561. The \fBset x2label\fR command sets the label for the x2 (top) axis.  Please see
  8562. \fBset xlabel\fR.
  8563. .sp 2
  8564. .NH 2
  8565. X2mtics
  8566. .sp 1
  8567. .LP
  8568. .XS
  8569. X2mtics
  8570. .XE
  8571. The \fBset x2mtics\fR command changes tics on the x2 (top) axis to months of the
  8572. year.  Please see \fBset xmtics\fR for details.
  8573. .sp 2
  8574. .NH 2
  8575. X2range
  8576. .sp 1
  8577. .LP
  8578. .XS
  8579. X2range
  8580. .XE
  8581. The \fBset x2range\fR command sets the horizontal range that will be displayed on
  8582. the x2 (top) axis.  Please see \fBset xrange\fR for details.
  8583. .sp 2
  8584. .NH 2
  8585. X2tics
  8586. .sp 1
  8587. .LP
  8588. .XS
  8589. X2tics
  8590. .XE
  8591. The \fBset x2tics\fR command controls major (labelled) tics on the x2 (top) axis.
  8592. Please see \fBset xtics\fR for details.
  8593. .sp 2
  8594. .NH 2
  8595. X2zeroaxis
  8596. .sp 1
  8597. .LP
  8598. .XS
  8599. X2zeroaxis
  8600. .XE
  8601. The \fBset x2zeroaxis\fR command draws a line at the origin of the x2 (top) axis
  8602. (x2 = 0).  For details, please see
  8603. \fBset zeroaxis\fR.
  8604. .sp 2
  8605. .NH 2
  8606. Xdata
  8607. .sp 1
  8608. .LP
  8609. .XS
  8610. Xdata
  8611. .XE
  8612. This command sets the datatype on the x axis to date/time.  A similar command
  8613. does the same thing for each of the other axes.
  8614.  
  8615. Syntax:
  8616. .br
  8617.       set xdata {time}
  8618. .br
  8619. .br
  8620.       show xdata
  8621. .br
  8622.  
  8623. The same syntax applies to \fBydata\fR, \fBzdata\fR, \fBx2data\fR and \fBy2data\fR.
  8624.  
  8625. The \fBtime\fR option signals that the datatype is indeed date/time.  If the
  8626. option is not specified, the datatype reverts to normal.
  8627.  
  8628. See \fBset timefmt\fR to tell \fBgnuplot\fR how to read date or time data.  The
  8629. date/time is converted to seconds from start of the century.  There is
  8630. currently only one timefmt, which implies that all the date/time columns must
  8631. confirm to this format.  Specification of ranges should be supplied as quoted
  8632. strings according to this format to avoid interpretation of the date/time as
  8633. an expression.
  8634.  
  8635. The function \&'strftime\&' (type "man strftime" on unix to look it up) is used
  8636. to print ticmark labels.  \fBgnuplot\fR tries to figure out a reasonable format
  8637. for this  unless the \fBset format x "string"\fR has supplied something that does
  8638. not look like a decimal format (more than one \&'%\&' or neither %f nor %g).
  8639.  
  8640. See also \fBTime/date\fR for more information.
  8641. .sp 2
  8642. .NH 2
  8643. Xdtics
  8644. .sp 1
  8645. .LP
  8646. .XS
  8647. Xdtics
  8648. .XE
  8649. The \fBset xdtics\fR commands converts the x-axis tic marks to days of the week
  8650. where 0=Sun and 6=Sat.  Overflows are converted modulo 7 to dates.  \fBset
  8651. noxdtics\fR returns the labels to their default values.  Similar commands do
  8652. the same things for the other axes.
  8653.  
  8654. Syntax:
  8655. .br
  8656.       set xdtics
  8657. .br
  8658. .br
  8659.       set noxdtics
  8660. .br
  8661. .br
  8662.       show xdtics
  8663. .br
  8664.  
  8665. The same syntax applies to \fBydtics\fR, \fBzdtics\fR, \fBx2dtics\fR and \fBy2dtics\fR.
  8666.  
  8667. See also the \fBset format\fR command.
  8668. .sp 2
  8669. .NH 2
  8670. Xlabel
  8671. .sp 1
  8672. .LP
  8673. .XS
  8674. Xlabel
  8675. .XE
  8676. The \fBset xlabel\fR command sets the x axis label.  Similar commands set labels
  8677. on the other axes.
  8678.  
  8679. Syntax:
  8680. .br
  8681.       set xlabel {"<label>"} {<xoff>}{,<yoff>} {"<font>{,<size>}"}
  8682. .br
  8683. .br
  8684.       show xlabel
  8685. .br
  8686.  
  8687. The same syntax applies to \fBx2label\fR, \fBylabel\fR, \fBy2label\fR and \fBzlabel\fR.
  8688.  
  8689. Specifying the constants <xoff> or <yoff> as optional offsets for a label
  8690. will move it <xoff> or <yoff> character widths or heights.  For example,
  8691. "\fB set xlabel -1\fR" will change only the x offset of the xlabel, moving the
  8692. label roughly one character width to the left.   The size of a character
  8693. depends on both the font and the terminal.
  8694.  
  8695. <font> is used to specify the font in which the label is written; the units
  8696. of the font <size> depend upon which terminal is used.
  8697.  
  8698. To clear a label, put no options on the command line, e.g., "\fBset y2label\fR".
  8699.  
  8700. The default positions of the axis labels are as follows:
  8701.  
  8702. xlabel:  The x-axis label is centered below the bottom axis.
  8703.  
  8704. ylabel:  The position of the y-axis label depends on the terminal, and can be
  8705. one of the following three positions:
  8706.  
  8707. 1. Horizontal text flushed left at the top left of the plot.  Terminals that
  8708. cannot rotate text will probably use this method.  If \fBset x2tics\fR is also
  8709. in use, the ylabel may overwrite the left-most x2tic label.  This may be
  8710. remedied by adjusting the ylabel position or the left margin.
  8711.  
  8712. 2. Vertical text centered vertically at the left of the plot.  Terminals
  8713. that can rotate text will probably use this method.
  8714.  
  8715. 3. Horizontal text centered vertically at the left of the plot.  The EEPIC,
  8716. LaTeX and TPIC drivers use this method.  The user must insert line breaks
  8717. using \\\\ to prevent the ylabel from overwriting the plot.  To produce a
  8718. vertical row of characters, add \\\\ between every printing character (but this
  8719. is ugly).
  8720.  
  8721. zlabel: The z-axis label is centered along the z axis and placed in the space
  8722. above the grid level.
  8723.  
  8724. y2label: The y2-axis label is placed to the right of the y2 axis.  The
  8725. position is terminal-dependent in the same manner as is the y-axis label.
  8726.  
  8727. x2label: The x2-axis label is placed above the top axis but below the plot
  8728. title.  It is also possible to create an x2-axis label by using new-line
  8729. characters to make a multi-line plot title, e.g.,
  8730.  
  8731. .br
  8732.       set title "This is the title\\n\\nThis is the x2label"
  8733. .br
  8734.  
  8735. Note that double quotes must be used.  The same font will be used for both
  8736. lines, of course.
  8737.  
  8738. If you are not satisfied with the default position of an axis label, use \fBset
  8739. label\fR instead--that command gives you much more control over where text is
  8740. placed.
  8741.  
  8742. Please see \fBset syntax\fR for further information about backslash processing
  8743. and the difference between single- and double-quoted strings.
  8744. .sp 2
  8745. .NH 2
  8746. Xmtics
  8747. .sp 1
  8748. .LP
  8749. .XS
  8750. Xmtics
  8751. .XE
  8752. The \fBset xmtics\fR commands converts the x-axis tic marks to months of the
  8753. year where 1=Jan and 12=Dec.  Overflows are converted modulo 12 to months.
  8754. The tics are returned to their default labels by \fBset noxmtics\fR.  Similar
  8755. commands perform the same duties for the other axes.
  8756.  
  8757. Syntax:
  8758. .br
  8759.       set xmtics
  8760. .br
  8761. .br
  8762.       set noxmtics
  8763. .br
  8764. .br
  8765.       show xmtics
  8766. .br
  8767.  
  8768. The same syntax applies to \fBx2mtics\fR, \fBymtics\fR, \fBy2mtics\fR, and \fBzmtics\fR.
  8769.  
  8770. See also the \fBset format\fR command.
  8771. .sp 2
  8772. .NH 2
  8773. Xrange
  8774. .sp 1
  8775. .LP
  8776. .XS
  8777. Xrange
  8778. .XE
  8779. The \fBset xrange\fR command sets the horizontal range that will be displayed.
  8780. A similar command exists for each of the other axes, as well as for the
  8781. polar radius r and the parametric variables t, u, and v.
  8782.  
  8783. Syntax:
  8784. .br
  8785.       set xrange [{{<min>}:{<max>}}] {{no}reverse} {{no}writeback}
  8786. .br
  8787. .br
  8788.       show xrange
  8789. .br
  8790.  
  8791. where <min> and <max> terms are constants, expressions or an asterisk to set
  8792. autoscaling.  If the data are date/time, you must give the range as a quoted
  8793. string according to the \fBset timefmt\fR format.  Any value omitted will not be
  8794. changed.
  8795.  
  8796. The same syntax applies to \fByrange\fR, \fBzrange\fR, \fBx2range\fR, \fBy2range\fR,
  8797. \fBrrange\fR, \fBtrange\fR, \fBurange\fR and \fBvrange\fR.
  8798.  
  8799. The \fBreverse\fR option reverses the direction of the axis, e.g., \fBset xrange
  8800. [0:1] reverse\fR will produce an axis with 1 on the left and 0 on the right.
  8801. This is identical to the axis produced by \fBset xrange [1:0]\fR, of course.
  8802. \fBreverse\fR is intended primarily for use with \fBautoscale\fR.
  8803.  
  8804. The \fBwriteback\fR option essentially saves the range found by \fBautoscale\fR in
  8805. the buffers that would be filled by \fBset xrange\fR.  This is useful if you wish
  8806. to plot several functions together but have the range determined by only
  8807. some of them.  The \fBwriteback\fR operation is performed during the \fBplot\fR
  8808. execution, so it must be specified before that command.  For example,
  8809.  
  8810. .br
  8811.       set xrange [-10:10]
  8812. .br
  8813. .br
  8814.       set yrange [] writeback
  8815. .br
  8816. .br
  8817.       plot sin(x)
  8818. .br
  8819. .br
  8820.       set noautoscale y
  8821. .br
  8822. .br
  8823.       replot x/2
  8824. .br
  8825.  
  8826. results in a yrange of [-1:1] as found only from the range of sin(x); the
  8827. [-5:5] range of x/2 is ignored.  Executing \fBshow yrange\fR after each command
  8828. in the above example should help you understand what is going on.
  8829.  
  8830. In 2-d, \fBxrange\fR and \fByrange\fR determine the extent of the axes, \fBtrange\fR
  8831. determines the range of the parametric variable in parametric mode or the
  8832. range of the angle in polar mode.  Similarly in parametric 3-d, \fBxrange\fR,
  8833. \fByrange\fR, and \fBzrange\fR govern the axes and \fBurange\fR and \fBvrange\fR govern the
  8834. parametric variables.
  8835.  
  8836. In polar mode, \fBrrange\fR determines the radial range plotted.  <rmin> acts as
  8837. an additive constant to the radius, whereas <rmax> acts as a clip to the
  8838. radius---no point with radius greater than <rmax> will be plotted.  \fBxrange\fR
  8839. and \fByrange\fR are affected---the ranges can be set as if the graph was of
  8840. r(t)-rmin, with rmin added to all the labels.
  8841.  
  8842. Any range may be partially or totally autoscaled, although it may not make
  8843. sense to autoscale a parametric variable unless it is plotted with data.
  8844.  
  8845. Ranges may also be specified on the \fBplot\fR command line.  A range given on
  8846. the plot line will be used for that single \fBplot\fR command; a range given by
  8847. a \fBset\fR command will be used for all subsequent plots that do not specify
  8848. their own ranges.  The same holds true for \fBsplot\fR.
  8849.  
  8850. Examples:
  8851.  
  8852. To set the xrange to the default:
  8853. .br
  8854.       set xrange [-10:10]
  8855. .br
  8856.  
  8857. To set the yrange to increase downwards:
  8858. .br
  8859.       set yrange [10:-10]
  8860. .br
  8861.  
  8862. To change zmax to 10 without affecting zmin (which may still be autoscaled):
  8863. .br
  8864.       set zrange [:10]
  8865. .br
  8866.  
  8867. To autoscale xmin while leaving xmax unchanged:
  8868. .br
  8869.       set xrange [*:]
  8870. .br
  8871. .sp 2
  8872. .NH 2
  8873. Xtics
  8874. .sp 1
  8875. .LP
  8876. .XS
  8877. Xtics
  8878. .XE
  8879. Fine control of the major (labelled) tics on the x axis is possible with the
  8880. \fBset xtics\fR command.  The tics may be turned off with the \fBset noxtics\fR
  8881. command, and may be turned on (the default state) with \fBset xtics\fR.  Similar
  8882. commands control the major tics on the y, z, x2 and y2 axes.
  8883.  
  8884. Syntax:
  8885. .br
  8886.       set xtics {axis | border} {{no}mirror} {{no}rotate}
  8887. .br
  8888. .br
  8889.                 {  <incr>
  8890. .br
  8891. .br
  8892.                  | <start>, <incr> {,<end>}
  8893. .br
  8894. .br
  8895.                  | ({"<label>"} <pos> {,{"<label>"} <pos>}...) }
  8896. .br
  8897. .br
  8898.       set noxtics
  8899. .br
  8900. .br
  8901.       show xtics
  8902. .br
  8903.  
  8904. The same syntax applies to \fBytics\fR, \fBztics\fR, \fBx2tics\fR and \fBy2tics\fR.
  8905.  
  8906. \fBaxis\fR or \fBborder\fR tells \fBgnuplot\fR to put the tics (both the tics themselves
  8907. and the accompanying labels) along the axis or the border, respectively.
  8908. \fBmirror\fR tells it to put unlabelled tics at the same positions on the
  8909. opposite border.  \fBnomirror\fR does what you think it does.  \fBrotate\fR asks
  8910. \fBgnuplot\fR to rotate the text through 90 degrees, if the underlying terminal
  8911. driver supports text rotation.  \fBnorotate\fR cancels this.  The defaults are
  8912. \fBborder mirror norotate\fR for tics on the x, y, x2, and y2 axes.  For the
  8913. z axis, the the \fB{axis | border}\fR option is not available and the default
  8914. is \fBnomirror\fR.  If you do want to mirror the z-axis tics, you might want
  8915. to create a bit more room for them with \fBset border\fR.
  8916.  
  8917. The positions of the tics may be specified in either of two forms:
  8918.  
  8919. The <start>, <incr>, <end> form specifies that a series of tics will be
  8920. plotted on the axis between the values <start> and <end> with an increment of
  8921. <incr>.  If <end> is not given, it is assumed to be infinity.  The increment
  8922. may be negative.  If neither <start> nor <end> is given, <start> is assumed
  8923. to be negative infinity, <end> is assumed to be positive infinity, and the
  8924. tics will be drawn at multiples of <step>---there will be a tic at zero (if
  8925. it is within the plotted range).  If the axis is logarithmic, the increment
  8926. will be used as a multiplicative factor.
  8927.  
  8928. Examples:
  8929.  
  8930. Make tics at 0, 0.5, 1, 1.5, ..., 9.5, 10.
  8931. .br
  8932.       set xtics 0,.5,10
  8933. .br
  8934.  
  8935. Make tics at ..., -10, -5, 0, 5, 10, ...
  8936. .br
  8937.       set xtics 5
  8938. .br
  8939.  
  8940. Make tics at 1, 100, 1e4, 1e6, 1e8.
  8941. .br
  8942.       set logscale x; set xtics 1,100,10e8
  8943. .br
  8944.  
  8945. The ("<label>" <pos>, ...) form allows arbitrary tic positions or non-numeric
  8946. tic labels.  A set of tics is a set of positions, each with its own optional
  8947. label.  Note that the label is a string enclosed by quotes, and may be a
  8948. constant string, such as "hello", or contain formatting information for the
  8949. tic number (which is the same as the position), such as "%3f clients".  See
  8950. \fBset format\fR for more information about this case.  The label may be made
  8951. empty by specifying it as an empty string.  If no string is given, the
  8952. default label (numerical) is used.  In this form, the tics do not need to be
  8953. listed in numerical order.
  8954.  
  8955. Examples:
  8956. .br
  8957.       set xtics ("low" 0, "medium" 50, "high" 100)
  8958. .br
  8959. .br
  8960.       set xtics (1,2,4,8,16,32,64,128,256,512,1024)
  8961. .br
  8962. .br
  8963.       set ytics ("bottom" 0, "" 10, "top" 20)
  8964. .br
  8965.  
  8966. In the second example, all tics are labelled.  In the third, only the end
  8967. tics are labelled.
  8968.  
  8969. Tics will only be plotted when in range.
  8970.  
  8971. Minor (unlabelled) tics can be added by the \fBset mxtics\fR command.
  8972.  
  8973. In case of timeseries data, position values must be given as quoted dates
  8974. or times according to the format \fBtimefmt\fR.  If the <start>, <incr>, <end>
  8975. form is used, <start> and <end> must be given according to \fBtimefmt\fR, but
  8976. <incr> must be in seconds.  Times will be written out according to the format
  8977. given on "set format", however.
  8978.  
  8979. Examples:
  8980. .br
  8981.       set xdata time
  8982. .br
  8983. .br
  8984.       set timefmt "%d/%m"
  8985. .br
  8986. .br
  8987.       set format x "%b %d"
  8988. .br
  8989. .br
  8990.       set xrange ["00/12":"06/12"]
  8991. .br
  8992. .br
  8993.       set xtics "01/12", 172800, "05/12"
  8994. .br
  8995.  
  8996. .br
  8997.       set xdata time
  8998. .br
  8999. .br
  9000.       set timefmt "%d/%m"
  9001. .br
  9002. .br
  9003.       set format x "%b %d"
  9004. .br
  9005. .br
  9006.       set xrange ["00/12":"06/12"]
  9007. .br
  9008. .br
  9009.       set xtics ("01/12", "" "03/12", "05/12")
  9010. .br
  9011. Both of these will produce tics "Dec 1", "Dec 3", and "Dec 5", but in the
  9012. second example the tic at "Dec 3" will be unlabelled.
  9013.  
  9014. .sp 2
  9015. .NH 2
  9016. Xzeroaxis
  9017. .sp 1
  9018. .LP
  9019. .XS
  9020. Xzeroaxis
  9021. .XE
  9022. The \fBset xzeroaxis\fR command draws a line at x = 0.  For details, please see
  9023. \fBset zeroaxis\fR.
  9024. .sp 2
  9025. .NH 2
  9026. Y2data
  9027. .sp 1
  9028. .LP
  9029. .XS
  9030. Y2data
  9031. .XE
  9032. The \fBset y2data\fR command sets y2 (right-hand) axis data to timeseries
  9033. (dates/times).  Please see \fBset xdata\fR.
  9034. .sp 2
  9035. .NH 2
  9036. Y2dtics
  9037. .sp 1
  9038. .LP
  9039. .XS
  9040. Y2dtics
  9041. .XE
  9042. The \fBset y2dtics\fR command changes tics on the y2 (right-hand) axis to days of
  9043. the week.  Please see \fBset xmtics\fR for details.
  9044. .sp 2
  9045. .NH 2
  9046. Y2label
  9047. .sp 1
  9048. .LP
  9049. .XS
  9050. Y2label
  9051. .XE
  9052. The \fBset y2dtics\fR command sets the label for the y2 (right-hand) axis.
  9053. Please see \fBset xlabel\fR.
  9054. .sp 2
  9055. .NH 2
  9056. Y2mtics
  9057. .sp 1
  9058. .LP
  9059. .XS
  9060. Y2mtics
  9061. .XE
  9062. The \fBset y2mtics\fR command changes tics on the y2 (right-hand) axis to months
  9063. of the year.  Please see \fBset xmtics\fR for details.
  9064. .sp 2
  9065. .NH 2
  9066. Y2range
  9067. .sp 1
  9068. .LP
  9069. .XS
  9070. Y2range
  9071. .XE
  9072. The \fBset y2range\fR command sets the vertical range that will be displayed on
  9073. the y2 (right-hand) axis.  Please see \fBset xrange\fR for details.
  9074. .sp 2
  9075. .NH 2
  9076. Y2tics
  9077. .sp 1
  9078. .LP
  9079. .XS
  9080. Y2tics
  9081. .XE
  9082. The \fBset y2tics\fR command controls major (labelled) tics on the y2 (right-hand)
  9083. axis.  Please see \fBset xtics\fR for details.
  9084. .sp 2
  9085. .NH 2
  9086. Y2zeroaxis
  9087. .sp 1
  9088. .LP
  9089. .XS
  9090. Y2zeroaxis
  9091. .XE
  9092. The \fBset y2zeroaxis\fR command draws a line at the origin of the y2 (right-hand)
  9093. axis (y2 = 0).  For details, please see \fBset zeroaxis\fR.
  9094. .sp 2
  9095. .NH 2
  9096. Ydata
  9097. .sp 1
  9098. .LP
  9099. .XS
  9100. Ydata
  9101. .XE
  9102. Sets y-axis data to timeseries (dates/times).  Please see \fBset xdata\fR.
  9103. .sp 2
  9104. .NH 2
  9105. Ydtics
  9106. .sp 1
  9107. .LP
  9108. .XS
  9109. Ydtics
  9110. .XE
  9111. The \fBset ydtics\fR command changes tics on the y axis to days of the week.
  9112. Please see \fBset xmtics\fR for details.
  9113. .sp 2
  9114. .NH 2
  9115. Ylabel
  9116. .sp 1
  9117. .LP
  9118. .XS
  9119. Ylabel
  9120. .XE
  9121. This command sets the label for the y axis.  Please see \fBset xlabel\fR.
  9122. .sp 2
  9123. .NH 2
  9124. Ymtics
  9125. .sp 1
  9126. .LP
  9127. .XS
  9128. Ymtics
  9129. .XE
  9130. The \fBset ymtics\fR command changes tics on the y axis to months of the year.
  9131. Please see \fBset xmtics\fR for details.
  9132. .sp 2
  9133. .NH 2
  9134. Yrange
  9135. .sp 1
  9136. .LP
  9137. .XS
  9138. Yrange
  9139. .XE
  9140. The \fBset yrange\fR command sets the vertical range that will be displayed on
  9141. the y axis.  Please see \fBset xrange\fR for details.
  9142. .sp 2
  9143. .NH 2
  9144. Ytics
  9145. .sp 1
  9146. .LP
  9147. .XS
  9148. Ytics
  9149. .XE
  9150. The \fBset ytics\fR command controls major (labelled) tics on the y axis.
  9151. Please see \fBset xtics\fR for details.
  9152. .sp 2
  9153. .NH 2
  9154. Yzeroaxis
  9155. .sp 1
  9156. .LP
  9157. .XS
  9158. Yzeroaxis
  9159. .XE
  9160. The \fBset yzeroaxis\fR command draws a line at y = 0.  For details, please see
  9161. \fBset zeroaxis\fR.
  9162. .sp 2
  9163. .NH 2
  9164. Zdata
  9165. .sp 1
  9166. .LP
  9167. .XS
  9168. Zdata
  9169. .XE
  9170. Set zaxis date to timeseries (dates/times).  Please see \fBset xdata\fR.
  9171. .sp 2
  9172. .NH 2
  9173. Zdtics
  9174. .sp 1
  9175. .LP
  9176. .XS
  9177. Zdtics
  9178. .XE
  9179. The \fBset zdtics\fR command changes tics on the z axis to days of the week.
  9180. Please see \fBset xmtics\fR for details.
  9181. .sp 2
  9182. .NH 2
  9183. Zero
  9184. .sp 1
  9185. .LP
  9186. .XS
  9187. Zero
  9188. .XE
  9189. The \fBzero\fR value is the default threshold for values approaching 0.0.
  9190.  
  9191. Syntax:
  9192. .br
  9193.       set zero <expression>
  9194. .br
  9195. .br
  9196.       show zero
  9197. .br
  9198.  
  9199. \fBgnuplot\fR will not plot a point if its imaginary part is greater in magnitude
  9200. than the \fBzero\fR threshold.  Axis ranges cannot be less than \fBzero\fR.  The
  9201. default \fBzero\fR value is 1e-8.
  9202. .sp 2
  9203. .NH 2
  9204. Zeroaxis
  9205. .sp 1
  9206. .LP
  9207. .XS
  9208. Zeroaxis
  9209. .XE
  9210. The x axis may be drawn by \fBset xzeroaxis\fR and removed by \fBset noxzeroaxis\fR.
  9211. Similar commands behave similarly for the y, x2, and y2 axes.
  9212.  
  9213. Syntax:
  9214. .br
  9215.       set zeroaxis {<linetype>}
  9216. .br
  9217. .br
  9218.       set xzeroaxis {<linetype>}
  9219. .br
  9220. .br
  9221.       set yzeroaxis {<linetype>}
  9222. .br
  9223. .br
  9224.       set x2zeroaxis {<linetype>}
  9225. .br
  9226. .br
  9227.       set y2zeroaxis {<linetype>}
  9228. .br
  9229. .br
  9230.       set nozeroaxis
  9231. .br
  9232. .br
  9233.       set noxzeroaxis
  9234. .br
  9235. .br
  9236.       etc.
  9237. .br
  9238. .br
  9239.       show zeroaxis
  9240. .br
  9241. .br
  9242.       show xzeroaxis
  9243. .br
  9244. .br
  9245.       etc.
  9246. .br
  9247.  
  9248. By default, these options are off.  The selected zero axis is drawn with a
  9249. line of type <linetype> from the default linetype list provided by the
  9250. terminal; user-defined linetypes (via the \fBset linestyle\fR command) are not
  9251. accessible for these axes.  If <linetype> is not specified, any zero axes
  9252. selected will be drawn using the axis linetype (linetype 0).
  9253.  
  9254. \fBset zeroaxis l\fR is equivalent to \fBset xzeroaxis l; set yzeroaxis l\fR. \fBset
  9255. nozeroaxis\fR is equivalent to \fBset noxzeroaxis; set noyzeroaxis\fR.
  9256. .sp 2
  9257. .NH 2
  9258. Zlabel
  9259. .sp 1
  9260. .LP
  9261. .XS
  9262. Zlabel
  9263. .XE
  9264. This command sets the label for the z axis.  Please see \fBset xlabel\fR.
  9265. .sp 2
  9266. .NH 2
  9267. Zmtics
  9268. .sp 1
  9269. .LP
  9270. .XS
  9271. Zmtics
  9272. .XE
  9273. The \fBset zmtics\fR command changes tics on the z axis to months of the year.
  9274. Please see \fBset xmtics\fR for details.
  9275. .sp 2
  9276. .NH 2
  9277. Zrange
  9278. .sp 1
  9279. .LP
  9280. .XS
  9281. Zrange
  9282. .XE
  9283. The \fBset zrange\fR command sets the range that will be displayed on the z axis.
  9284. The zrange is used only by \fBsplot\fR and is ignored by \fBplot\fR.  Please see \fBset
  9285. xrange\fR for details.
  9286. .sp 2
  9287. .NH 2
  9288. Ztics
  9289. .sp 1
  9290. .LP
  9291. .XS
  9292. Ztics
  9293. .XE
  9294. The \fBset ztics\fR command controls major (labelled) tics on the z axis.
  9295. Please see \fBset xtics\fR for details.
  9296. .sp 2
  9297. .RE
  9298. .br
  9299. .NH 1
  9300. Shell
  9301. .sp 1
  9302. .LP
  9303. .XS
  9304. Shell
  9305. .XE
  9306. The \fBshell\fR command spawns an interactive shell.  To return to \fBgnuplot\fR,
  9307. type \fBlogout\fR if using VMS, \fBexit\fR or the END-OF-FILE character if using
  9308. Unix, \fBendcli\fR if using AmigaDOS, or \fBexit\fR if using MS-DOS or OS/2.
  9309.  
  9310. A single shell command may be spawned by preceding it with the ! character
  9311. ($ if using VMS) at the beginning of a command line.  Control will return
  9312. immediately to \fBgnuplot\fR after this command is executed.  For example, in
  9313. Unix, AmigaDOS, MS-DOS or OS/2,
  9314.  
  9315. .br
  9316.       ! dir
  9317. .br
  9318.  
  9319. prints a directory listing and then returns to \fBgnuplot\fR.
  9320.  
  9321. On an Atari, the \fB!\fR command first checks whether a shell is already loaded
  9322. and uses it, if available.  This is practical if \fBgnuplot\fR is run from
  9323. \fBgulam\fR, for example.
  9324. .sp 2
  9325. .NH 1
  9326. Splot
  9327. .sp 1
  9328. .LP
  9329. .XS
  9330. Splot
  9331. .XE
  9332. \fBsplot\fR is the primary command for drawing 3-d plots (well, actually
  9333. projections on a 2-d surface, but you knew that).  It can create a plot from
  9334. functions or data in a manner very similar to the \fBplot\fR command.
  9335.  
  9336. Please see \fBplot\fR for features common to the \fBplot\fR command; only differences
  9337. are discussed in detail here.
  9338.  
  9339. Syntax:
  9340. .br
  9341.       splot {<ranges>}
  9342. .br
  9343. .br
  9344.             {<function> | {"<datafile>" {datafile-modifiers}}}
  9345. .br
  9346. .br
  9347.             {<title-spec>} {with <style>}
  9348. .br
  9349. .br
  9350.             {, {definitions,} <function> ...}
  9351. .br
  9352.  
  9353. where either a <function> or the name of a data file enclosed in quotes is
  9354. supplied.  A function is a mathematical expression, or a triple (\fBsplot\fR) of
  9355. mathematical expressions in parametric mode.
  9356.  
  9357. By default \fBsplot\fR draws the xy plane completely below the plotted data.  The
  9358. offset between the lowest ztic and the xy plane can be changed by \fBset
  9359. ticslevel\fR.  The orientation of a \&'splot\&' is controlled by \fBset view\fR.  See
  9360. \fBset view\fR and \fBset ticslevel\fR for more information.
  9361.  
  9362. The syntax for setting ranges on the \fBsplot\fR command is the same as for
  9363. \fBplot\fR.  In non-parametric mode, the order in which ranges must be given is
  9364. \fBxrange\fR, \fByrange\fR, and \fBzrange\fR.  In parametric mode, the order is \fBurange\fR,
  9365. \fBvrange\fR, \fBxrange\fR, \fByrange\fR, and \fBzrange\fR.
  9366.  
  9367. The \fBtitle\fR option is the same as in \fBplot\fR.  The operation of \fBwith\fR is also
  9368. the same as in \fBplot\fR, except that the plotting styles available to \fBsplot\fR
  9369. are limited to \fBlines\fR, \fBpoints\fR, \fBlinespoints\fR, \fBdots\fR, and \fBimpulses\fR;  the
  9370. error-bar capabilities of \fBplot\fR are not available for \fBsplot\fR.
  9371.  
  9372. The datafile options have more differences.
  9373. .sp 2
  9374. .RS
  9375. .IP
  9376. .NH 2
  9377. Data-file
  9378. .sp 1
  9379. .LP
  9380. .XS
  9381. Data-file
  9382. .XE
  9383. Discrete data contained in a file can be displayed by specifying the name of
  9384. the data file (enclosed in quotes) on the \fBplot\fR or \fBsplot\fR command line.
  9385.  
  9386. Syntax:
  9387. .br
  9388.       splot '<file_name>' {binary | matrix}
  9389. .br
  9390. .br
  9391.                           {index <index list>}
  9392. .br
  9393. .br
  9394.                           {every <every list>}
  9395. .br
  9396. .br
  9397.                           {using <using list>}
  9398. .br
  9399.  
  9400. The special filenames \fB""\fR and \fB"-"\fR are permitted, as in \fBplot\fR.
  9401.  
  9402. In brief, \fBbinary\fR indicates that the file is binary, \fBmatrix\fR indicates that
  9403. the data are in matrix form, \fBindex\fR selects which data sets in a
  9404. multi-data-set file are to be plotted, \fBevery\fR specifies which datalines
  9405. within a single data set are to be plotted, and \fBusing\fR determines how the
  9406. columns within a single record are to be interpreted.
  9407.  
  9408. The options \fBindex\fR and \fBevery\fR behave the same way as with \fBplot\fR.  \fBusing\fR
  9409. also does, with the obvious difference that the \fBusing\fR list must provide
  9410. three entries instead of two.
  9411.  
  9412. The \fBplot\fR options \fBthru\fR and \fBsmooth\fR are not available for \fBsplot\fR.
  9413.  
  9414. Data file organization is essentially the same as for \fBplot\fR, except that
  9415. each point is an (x,y,z) triple.  If only a single value is provided, it will
  9416. be used for z, the data point number will be used for x, and the y-isoline
  9417. number will be used for y; thus "\fBsplot \&'file\&' using 1\fR" is identical to
  9418. "\fBsplot \&'file\&' using 0:-1:1\fR".  If two values are provided, \fBgnuplot\fR gives
  9419. you an error message.  Three values are interpreted as an (x,y,z) triple.
  9420. Additional values are generally used as errors, which can be used by \fBfit\fR.
  9421.  
  9422. Single blank records separate datalines (which are interpreted as y-isolines)
  9423. in a \fBsplot\fR datafile.  No line will join points separated by a blank record.
  9424. If all datalines contain the same number of points,\fBgnuplot\fR will draw
  9425. cross-isolines in the opposite direction.  This is termed "grid data", and is
  9426. required for drawing a surface, for contouring (\fBset contour\fR) and
  9427. hidden-line removal (\fBset hidden3d\fR).
  9428.  
  9429. It is no longer necessary to specify \fBparametric\fR mode for three-column
  9430. \fBsplot\fRs.
  9431. .sp 2
  9432. .RS
  9433. .IP
  9434. .NH 3
  9435. Binary
  9436. .sp 1
  9437. .LP
  9438. .XS
  9439. Binary
  9440. .XE
  9441. In previous versions, \fBgnuplot\fR dynamically detected binary data files.  It
  9442. is now necessary to specify the keyword \fBbinary\fR directly after the filename.
  9443.  
  9444. Single precision floats are stored in a binary file as follows:
  9445.  
  9446. .br
  9447.       <N+1>  <y0>   <y1>   <y2>  ...  <yN>
  9448. .br
  9449. .br
  9450.        <x0> <z0,0> <z0,1> <z0,2> ... <z0,N>
  9451. .br
  9452. .br
  9453.        <x1> <z1,0> <z1,1> <z1,2> ... <z1,N>
  9454. .br
  9455. .br
  9456.         :      :      :      :   ...    :
  9457. .br
  9458.  
  9459.  
  9460. which are converted into triplets:
  9461.  
  9462. .br
  9463.       <x0> <y0> <z0,0>
  9464. .br
  9465. .br
  9466.       <x0> <y1> <z0,1>
  9467. .br
  9468. .br
  9469.       <x0> <y2> <z0,2>
  9470. .br
  9471. .br
  9472.        :    :     :
  9473. .br
  9474. .br
  9475.       <x0> <yN> <z0,N>
  9476. .br
  9477.  
  9478. .br
  9479.       <x1> <y0> <z1,0>
  9480. .br
  9481. .br
  9482.       <x1> <y1> <z1,1>
  9483. .br
  9484. .br
  9485.        :    :     :
  9486. .br
  9487.  
  9488. These triplets are then converted into \fBgnuplot\fR iso-curves and then
  9489. \fBgnuplot\fR proceeds in the usual manner to do the rest of the plotting.
  9490.  
  9491. A collection of matrix and vector manipulation routines (in C) is provided
  9492. in \fBbinary.c\fR.  The routine to write binary data is
  9493.  
  9494. .br
  9495.       int fwrite_matrix(file,m,nrl,nrl,ncl,nch,row_title,column_title)
  9496. .br
  9497.  
  9498. An example of using these routines is provided in the file \fBbf_test.c\fR, which
  9499. generates binary files for the demo file \fBdemo/binary.dem\fR.
  9500.  
  9501. The \fBindex\fR keyword is not supported, since the file format allows only one
  9502. surface per file.  The \fBevery\fR and \fBusing\fR filters are supported.  \fBusing\fR
  9503. operates as if the data were read in the above triplet form.
  9504. .sp 2
  9505. .NH 3
  9506. Example datafile
  9507. .sp 1
  9508. .LP
  9509. .XS
  9510. Example datafile
  9511. .XE
  9512. A simple example of plotting a 3-d data file is
  9513.  
  9514. .br
  9515.       splot 'datafile.dat'
  9516. .br
  9517.  
  9518. where the file "datafile.dat" might contain:
  9519.  
  9520. .br
  9521.       # The valley of the Gnu.
  9522. .br
  9523. .br
  9524.          0 0 10
  9525. .br
  9526. .br
  9527.          0 1 10
  9528. .br
  9529. .br
  9530.          0 2 10
  9531. .br
  9532.  
  9533. .br
  9534.          1 0 10
  9535. .br
  9536. .br
  9537.          1 1 5
  9538. .br
  9539. .br
  9540.          1 2 10
  9541. .br
  9542.  
  9543. .br
  9544.          2 0 10
  9545. .br
  9546. .br
  9547.          2 1 1
  9548. .br
  9549. .br
  9550.          2 2 10
  9551. .br
  9552.  
  9553. .br
  9554.          3 0 10
  9555. .br
  9556. .br
  9557.          3 1 0
  9558. .br
  9559. .br
  9560.          3 2 10
  9561. .br
  9562.  
  9563. Note that "datafile.dat" defines a 4 by 3 grid ( 4 rows of 3 points each ).
  9564. Rows are separated by blank records.
  9565.  
  9566. Note also that the x value is held constant within each dataline.  If you
  9567. instead keep y constant, and plot with hidden-line removal enabled, you will
  9568. find that the surface is drawn \&'inside-out\&'.
  9569.  
  9570. Actually for grid data it is not necessary to keep the x values constant
  9571. within an dataline, nor is it necessary to keep the y values the same along
  9572. the perpendicular datalines.  \fBgnuplot\fR requires only that the number of
  9573. points be the same for each dataline.
  9574. .sp 2
  9575. .NH 3
  9576. Matrix
  9577. .sp 1
  9578. .LP
  9579. .XS
  9580. Matrix
  9581. .XE
  9582. The \fBmatrix\fR flag indicates that the data are stored in matrix format.  In
  9583. its present implementation the z-values are read in a row at a time, i. e.,
  9584. .br
  9585.       z11 z12 z13 z14 ...
  9586. .br
  9587. .br
  9588.       z21 z22 z23 z24 ...
  9589. .br
  9590. .br
  9591.       z31 z32 z33 z34 ...
  9592. .br
  9593. and so forth.  The row and column indices are used for the x- and y-values.
  9594. used as x, y, and z.
  9595. .sp 2
  9596. .RE
  9597. .br
  9598. .RE
  9599. .br
  9600. .NH 1
  9601. Test
  9602. .sp 1
  9603. .LP
  9604. .XS
  9605. Test
  9606. .XE
  9607. \fBtest\fR creates a display of line and point styles and other useful things
  9608. appropriate for the terminal you are using.
  9609.  
  9610. Syntax:
  9611. .br
  9612.       test
  9613. .br
  9614. .sp 2
  9615. .NH 1
  9616. Update
  9617. .sp 1
  9618. .LP
  9619. .XS
  9620. Update
  9621. .XE
  9622. This command writes the current values of the fit parameters into the given
  9623. file, which is formatted as an initial-value file (as described in the \fBfit\fR
  9624. section).  This is useful for saving the current values for later use or for
  9625. restarting a converged or stopped fit.
  9626.  
  9627. Syntax:
  9628. .br
  9629.       update <filename> {<filename>}
  9630. .br
  9631.  
  9632. If the file already exists, \fBgnuplot\fR first renames it by appending \fB.old\fR
  9633. and then opens a new file.  That is, "\fBupdate \&'fred\&'\fR" behaves the same way
  9634. as "\fB!rename fred fred.old; update \&'fred.old\&' \&'fred\&'\fR".  [On DOS and other
  9635. systems that use the twelve-character "filename.ext" naming convention, "ext"
  9636. will be "\fBold\fR" and "filename" will be related (hopefully recognizably) to
  9637. the initial name.  Renaming is not done at all on VMS systems, since they use
  9638. file-versioning.]
  9639.  
  9640. If a second filename is supplied, the updated values are written to this
  9641. file instead, and the original parameter file is left unmodified.
  9642.  
  9643. Please see \fBfit\fR for more information.
  9644. .sp 3
  9645. .NH 1
  9646. Graphical User Interfaces
  9647. .sp 1
  9648. .LP
  9649. .XS
  9650. Graphical User Interfaces
  9651. .XE
  9652. Several graphical user interfaces have been written for \fBgnuplot\fR and one for
  9653. win32 is included in this distribution.  In addition, there is a Macintosh
  9654. interface at
  9655. .br
  9656.        ftp://ftp.ee.gatech.edu/pub/mac/gnuplot
  9657. .br
  9658. and several X11 interfaces include three Tcl/Tk located at the usual Tcl/Tk
  9659. repositories.
  9660. .sp 3
  9661. .NH 1
  9662. Bugs
  9663. .sp 1
  9664. .LP
  9665. .XS
  9666. Bugs
  9667. .XE
  9668. The bessel functions do not work for complex arguments.
  9669.  
  9670. The gamma function does not work for complex arguments.
  9671.  
  9672. There is a bug in the stdio library for old Sun operating systems (SunOS
  9673. Sys4-3.2).  The "%g" format for \&'printf\&' sometimes incorrectly prints numbers
  9674. (e.g., 200000.0 as "2").  Thus, tic mark labels may be incorrect on a Sun4
  9675. version of \fBgnuplot\fR.  A work-around is to rescale the data or use the \fBset
  9676. format\fR command to change the tic mark format to "%7.0f" or some other
  9677. appropriate format.  This appears to have been fixed in SunOS 4.0.
  9678.  
  9679. Another bug: On a Sun3 under SunOS 4.0, and on Sun4\&'s under Sys4-3.2 and
  9680. SunOS 4.0, the \&'sscanf\&' routine incorrectly parses "00 12" with the format
  9681. "%f %f" and reads 0 and 0 instead of 0 and 12.  This affects data input.  If
  9682. the data file contains x coordinates that are zero but are specified like
  9683. \&\&'00\&', \&'000\&', etc, then you will read the wrong y values.  Check any data
  9684. files or upgrade the SunOS.  It appears to have been fixed in SunOS 4.1.1.
  9685.  
  9686. Suns appear to overflow when calculating exp(-x) for large x, so \fBgnuplot\fR
  9687. gets an undefined result.  One work-around is to make a user-defined function
  9688. like e(x) = x<-500 ? 0 : exp(x).  This affects plots of Gaussians (exp(-x*x))
  9689. in particular, since x*x grows quite rapidly.
  9690.  
  9691. Microsoft C 5.1 has a nasty bug associated with the %g format for \&'printf\&'.
  9692. When any of the formats "%.2g", "%.1g", "%.0g", "%.g" are used, \&'printf\&' will
  9693. incorrectly print numbers in the range 1e-4 to 1e-1.  Numbers that should be
  9694. printed in the %e format are incorrectly printed in the %f format, with the
  9695. wrong number of zeros after the decimal point.  To work around this problem,
  9696. use the %e or %f formats explicitly.
  9697.  
  9698. \fBgnuplot\fR, when compiled with Microsoft C, did not work correctly on two VGA
  9699. displays that were tested.  The CGA, EGA and VGA drivers should probably be
  9700. rewritten to use the Microsoft C graphics library.  \fBgnuplot\fR compiled with
  9701. Borland C++ uses the Turbo C graphics drivers and does work correctly with
  9702. VGA displays.
  9703.  
  9704. VAX/VMS 4.7 C compiler release 2.4 also has a poorly implemented %g format
  9705. for \&'printf\&'.  The numbers are printed numerically correct, but may not be in
  9706. the requested format.  The K&R second edition says that for the %g format, %e
  9707. is used if the exponent is less than -4 or greater than or equal to the
  9708. precision.  The VAX uses %e format if the exponent is less than -1.  The VAX
  9709. appears to take no notice of the precision when deciding whether to use %e or
  9710. %f for numbers less than 1.  To work around this problem, use the %e or %f
  9711. formats explicitly.  From the VAX C 2.4 release notes: e,E,f,F,g,G  Result
  9712. will always contain a decimal  point.  For g and G, trailing zeros will not
  9713. be removed from the result.
  9714.  
  9715. VAX/VMS 5.2 C compiler release 3.0 has a slightly better implemented %g
  9716. format than release 2.4, but not much.  Trailing decimal points are now
  9717. removed, but trailing zeros are still not removed from %g numbers in
  9718. exponential format.
  9719.  
  9720. The two preceding problems are actually in the libraries rather than in the
  9721. compilers.  Thus the problems will occur whether \fBgnuplot\fR is built using
  9722. either the DEC compiler or some other one (e.g. the latest gcc).
  9723.  
  9724. ULTRIX X11R3 has a bug that causes the X11 driver to display "every other"
  9725. graph.  The bug seems to be fixed in DEC\&'s release of X11R4 so newer releases
  9726. of ULTRIX don\&'t seem to have the problem.  Solutions for older sites include
  9727. upgrading the X11 libraries (from DEC or direct from MIT) or defining
  9728. ULTRIX_KLUDGE when compiling the x11.trm file.  Note that the kludge is not
  9729. an ideal fix, however.
  9730.  
  9731. The constant HUGE was incorrectly defined in the NeXT OS 2.0 operating
  9732. system.  HUGE should be set to 1e38 in plot.h. This error has been corrected
  9733. in the 2.1 version of NeXT OS.
  9734.  
  9735. Some older models of HP plotters do not have a page eject command \&'PG\&'.  The
  9736. current HPGL driver uses this command in HPGL_reset.  This may need to be
  9737. removed for these plotters.  The current PCL5 driver uses HPGL/2 for text as
  9738. well as graphics.  This should be modified to use scalable PCL fonts.
  9739.  
  9740. On the Atari version, it is not possible to send output directly to the
  9741. printer (using \fB/dev/lp\fR as output file), since CRs are added to LFs in
  9742. binary output.  As a work-around, write the output to a file and copy it to
  9743. the printer afterwards using a shell command.
  9744.  
  9745. On AIX 4, the literal \&'NaNq\&' in a datafile causes the special internal value
  9746. \&\&'not-a-number\&' to be stored, rather than setting an internal \&'undefined\&'
  9747. flag.  A workaround is to use \fBset missing \&'NaNq\&'\fR.
  9748.  
  9749. There may be an up-to-date list of bugs since the release on the WWW page:
  9750. .br
  9751.       http://www.cs.dartmouth.edu/gnuplot
  9752. .br
  9753.  
  9754. Please report any bugs to bug-gnuplot@dartmouth.edu.
  9755. .pn 1
  9756. .ds RH %
  9757. .af % i
  9758. .bp
  9759. .PX
  9760.